A lingering doubt on PCI-MMIO region of PCI-passthrough-device
From: Ajay Garg
Date: Sun Dec 14 2025 - 07:09:03 EST
Hi everyone.
Let's assume x86_64-linux host and guest, with full-virtualization and
iommu hardware capabilities.
Before launching vm, qemu with the help vfio "installs" "dev1" on the
virtual-pci-root-complex of guest.
After bootup, the guest does the usual enumeration, finds "dev1" on
the pci-bus, and programs the BARs in its domain.
However, there is no guarantee that guest-pci-mmio-physical-ranges
would be identical to "what would have been"
host-pci-mmio-physical-ranges.
Then how does the EPT/SLAT tables get set up for correct mapping from
GPA => HPA for dev1's-BARs-MMIO-regions ?
Will be grateful for pointers.
Thanks and Regards,
Ajay