[pve-devel] [RFC qemu-server v2 3/4] fix #6378 (continued): warn intel-iommu users about iommu and host aw bits mismatch
Daniel Kral
d.kral at proxmox.com
Tue Sep 2 13:26:52 CEST 2025
On Tue Sep 2, 2025 at 1:22 PM CEST, Daniel Kral wrote:
> For certain host CPUs, such as Intel consumer-grade CPUs, there is a
> frequent mismatch between the CPU's physical address width and the
> IOMMU's address width.
>
> If a virtual machine is setup with an intel-iommu device, qemu allocates
> and maps the (virtual) I/O address space (IOAS) for a VFIO passthrough
> device with iommufd.
>
> In case of a mismatch of the address width of the host CPU and IOMMU
> CPU, the guest physical address space (GPAS) and memory-type range
small error: it's just IOMMU, not "IOMMU CPU"
> registers (MTRRs) are setup to the host CPU's address width, which
> causes IOAS to be allocated and mapped outside of the IOMMU's maximum
> guest address width (MGAW) and causes the following error from qemu (the
> error message is copied from the user forum [0]):
>
> kvm: vfio_container_dma_map(0x5c9222494280, 0x380000000000, 0x10000, 0x78075ee70000) = -22 (Invalid argument)
>
> This error is rather confusing and unhelpful to users, so warn them
> about a CPU physical address width that exceeds the IOMMU address width.
>
> [0] https://forum.proxmox.com/threads/vm-wont-start-with-pci-passthrough-after-upgrade-to-9-0.169586/page-3#post-795717
>
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>
More information about the pve-devel
mailing list