Skip to content

Commit 73db2fc

Browse files
ssuthiku-amdjoergroedel
authored andcommitted
iommu/amd: Increase interrupt remapping table limit to 512 entries
Certain device drivers allocate IO queues on a per-cpu basis. On AMD EPYC platform, which can support up-to 256 cpu threads, this can exceed the current MAX_IRQ_PER_TABLE limit of 256, and result in the error message: AMD-Vi: Failed to allocate IRTE This has been observed with certain NVME devices. AMD IOMMU hardware can actually support upto 512 interrupt remapping table entries. Therefore, update the driver to match the hardware limit. Please note that this also increases the size of interrupt remapping table to 8KB per device when using the 128-bit IRTE format. Signed-off-by: Suravee Suthikulpanit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 3cea11c commit 73db2fc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/iommu/amd/amd_iommu_types.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,11 @@ extern bool amd_iommu_np_cache;
409409
/* Only true if all IOMMUs support device IOTLBs */
410410
extern bool amd_iommu_iotlb_sup;
411411

412-
#define MAX_IRQS_PER_TABLE 256
412+
/*
413+
* AMD IOMMU hardware only support 512 IRTEs despite
414+
* the architectural limitation of 2048 entries.
415+
*/
416+
#define MAX_IRQS_PER_TABLE 512
413417
#define IRQ_TABLE_ALIGNMENT 128
414418

415419
struct irq_remap_table {

0 commit comments

Comments
 (0)