diff mbox series

[4/5] iommu/dart: Reject identity domain for locked DARTs

Message ID 20250210-locked-dart-v1-4-5d97fe247f35@rosenzweig.io (mailing list archive)
State New
Headers show
Series iommu: apple-dart: Support locked DARTs | expand

Commit Message

Alyssa Rosenzweig Feb. 10, 2025, 7:39 p.m. UTC
This cannot work.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Janne Grunau <j@jannau.net>
---
 drivers/iommu/apple-dart.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Nick Chan Feb. 11, 2025, 6:07 a.m. UTC | #1
Alyssa Rosenzweig 於 2025/2/11 凌晨3:39 寫道:
> This cannot work.
>
> Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
> Signed-off-by: Janne Grunau <j@jannau.net>
The submitter's sign-off must be the last sign-off. It appears that you are the author
of this patch, so drop Janne's sign-off.
[...]

Nick Chan
Alyssa Rosenzweig Feb. 11, 2025, 12:17 p.m. UTC | #2
> > Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
> > Signed-off-by: Janne Grunau <j@jannau.net>
> The submitter's sign-off must be the last sign-off. It appears that you are the author
> of this patch, so drop Janne's sign-off.

Thanks, fixed in v2.
diff mbox series

Patch

diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c
index 9c6f780dc7220096ed6bba692fa1a4bd859b0d61..29b627b38e8c37afd2b6a72865f43d24b633834a 100644
--- a/drivers/iommu/apple-dart.c
+++ b/drivers/iommu/apple-dart.c
@@ -681,6 +681,9 @@  static int apple_dart_attach_dev_identity(struct iommu_domain *domain,
 	if (!cfg->stream_maps[0].dart->supports_bypass)
 		return -EINVAL;
 
+	if (cfg->stream_maps[0].dart->locked)
+		return -EINVAL;
+
 	for_each_stream_map(i, cfg, stream_map)
 		apple_dart_hw_enable_bypass(stream_map);
 	return 0;