|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.17] AMD/IOMMU: correct devtab size writing
commit 558f6f70284f09333eb1c361ef739fe3c469fe57
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Nov 17 17:32:54 2026 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 17 17:32:54 2026 +0100
AMD/IOMMU: correct devtab size writing
The fix for XSA-524 inadvertently converted a page-granular value to a
byte-granular one, thus always setting maximum size (2Mb) without the
table always being that size.
Fixes: d7378932b1fc ("AMD/IOMMU: allocate (at least) one spare device table
entry")
Reported-by: Roger Pau Monné <roger.pau@xxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxx>
master commit: ab77da87e9b38022341eb6a54593e681485d203a
master date: 2026-11-17 17:02:47 +0100
---
xen/drivers/passthrough/amd/iommu_init.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/xen/drivers/passthrough/amd/iommu_init.c
b/xen/drivers/passthrough/amd/iommu_init.c
index 741dd4a6bb..885e58e84d 100644
--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -91,9 +91,8 @@ static void register_iommu_dev_table_in_mmio_space(struct
amd_iommu *iommu)
entry = 0;
iommu_set_addr_lo_to_reg(&entry, addr_lo >> PAGE_SHIFT);
- set_field_in_reg_u32(ROUNDUP(iommu->dev_table.entries *
- IOMMU_DEV_TABLE_ENTRY_SIZE,
- PAGE_SIZE) - 1,
+ set_field_in_reg_u32(PFN_UP(iommu->dev_table.entries *
+ IOMMU_DEV_TABLE_ENTRY_SIZE) - 1,
entry, IOMMU_DEV_TABLE_SIZE_MASK,
IOMMU_DEV_TABLE_SIZE_SHIFT, &entry);
writel(entry, iommu->mmio_base + IOMMU_DEV_TABLE_BASE_LOW_OFFSET);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.17
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |