On 9/29/2026 8:30 AM, Matthew Rosato wrote:
When walking the guest IO address table, an invalid segment or region
entry causes table_translate() to return entry.len equal to the frame
size for that table level (1 MiB for ST, 2 GiB for RT). Adding
entry.len directly to start only advances to the correct next frame
boundary if start is already frame-aligned at that level -- which is
true for a well-behaved Linux guest but not a general requirement.
Add logic to advance start to the next frame boundary rather than
simply adding entry.len. For a frame-aligned start (the typical,
well-behaved case) the result is identical.
Fixes: 0125861eacc3 ("s390x/pci: fixup the code walking IOMMU tables")
Cc:[email protected]
Signed-off-by: Matthew Rosato<[email protected]>
---
hw/s390x/s390-pci-inst.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Farhan Ali <[email protected]>