Skip to contentSkip to conversation

iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs

PATCH Applied Suravee Suthikulpanit 3 participants 3 messages Dec 7, 2020

Subsystems (2)
lore
Share & tools
lore

Suravee Suthikulpanit

author reviewer
#0 lore raw

PATCH 1/1 iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs

According to the AMD IOMMU spec, the commit 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries") also requires the interrupt table length (IntTabLen) to be set to 9 (power of 2) in the device table mapping entry (DTE).

Fixes 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries")
---
 drivers/iommu/amd/amd_iommu_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/amd_iommu_types.h +1 -1
index 89647700bab2..494b42a31b7a 100644
@@ -257,7 +257,7 @@
 #define DTE_IRQ_REMAP_INTCTL_MASK	(0x3ULL << 60)
 #define DTE_IRQ_TABLE_LEN_MASK	(0xfULL << 1)
 #define DTE_IRQ_REMAP_INTCTL    (2ULL << 60)
-#define DTE_IRQ_TABLE_LEN       (8ULL << 1)
+#define DTE_IRQ_TABLE_LEN       (9ULL << 1)
 #define DTE_IRQ_REMAP_ENABLE    1ULL
 
 #define PAGE_MODE_NONE    0x00
Signature · 6 lines
2.17.1

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Reviewed-by on v1 1/1
#1 lore raw

Suravee Suthikulpanit @ 2020-12-07 02:19 MST:

Quoted 17 lines

According to the AMD IOMMU spec, the commit 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries") also requires the interrupt table length (IntTabLen) to be set to 9 (power of 2) in the device table mapping entry (DTE).

Fixes 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries")
---
 drivers/iommu/amd/amd_iommu_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/amd_iommu_types.h +0 -0
index 89647700bab2..494b42a31b7a 100644

drivers/iommu/amd/amd_iommu_types.h line 263

Quoted 8 lines
drivers/iommu/amd/amd_iommu_types.h +1 -1
@@ -257,7 +257,7 @@
 #define DTE_IRQ_REMAP_INTCTL_MASK	(0x3ULL << 60)
 #define DTE_IRQ_TABLE_LEN_MASK	(0xfULL << 1)
 #define DTE_IRQ_REMAP_INTCTL    (2ULL << 60)
-#define DTE_IRQ_TABLE_LEN       (8ULL << 1)
+#define DTE_IRQ_TABLE_LEN       (9ULL << 1)
 #define DTE_IRQ_REMAP_ENABLE    1ULL
 
 #define PAGE_MODE_NONE    0x00

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

maintainer Applied
#2 lore raw
In reply to Suravee Suthikulpanit
Quoted 4 lines · Suravee Suthikulpanit

According to the AMD IOMMU spec, the commit 73db2fc595f3 ("iommu/amd: Increase interrupt remapping table limit to 512 entries") also requires the interrupt table length (IntTabLen) to be set to 9 (power of 2) in the device table mapping entry (DTE).

Applied to arm64 (for-next/iommu/fixes), thanks!

[1/1] iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs

      https://git.kernel.org/arm64/c/4165bf015ba9

Cheers,

Signature · 9 lines
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu