On 6/10/2026 2:13 AM, Dongli Zhang wrote:
AMDVIAddressSpace->devfn only contains the PCI device/function number. AMD-Vi event log entries require the full DeviceID, including the PCI bus number. When reporting IO page faults for devices behind a pcie-root-port, QEMU logs the fault against the wrong requester. For example, a fault from 01:00.0 is reported as 00:00.0 because only devfn is passed to amdvi_page_fault(). [root@vm ~]# lspci ... ... 01:00.0 Ethernet controller: Red Hat, Inc. Virtio 1.0 network device (rev 01) [ 58.154050] pci 0000:00:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0000 address=0xc0000000 flags=0x000a] [ 58.156968] pci 0000:00:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0000 address=0xc0000000 flags=0x000a] Use the full BDF consistently for AMD-Vi address spaces and pass it to page fault and page-table access error reporting. Signed-off-by: Dongli Zhang <[email protected]> --- hw/i386/amd_iommu.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
Please add fixes tag. Thanks Sairaj
