On 9/5/25 15:04, Daniel Kral wrote:
On Thu Jan 30, 2025 at 2:43 PM CET, Cédric Le Goater wrote:
Print a warning if IOMMU address space width is smaller than the
physical address width. In this case, PCI peer-to-peer transactions on
BARs are not supported and failures of device MMIO regions are to be
expected.

This can occur with the 39-bit IOMMU address space width as found on
consumer grade processors or when using a vIOMMU device with default
settings.

Signed-off-by: Cédric Le Goater <c...@redhat.com>

Hi Cédric!

Some of our users are running into this with Proxmox VE, where they get
vfio_container_dma_map(...) = -22 errors, which are likely caused by
this issue of the mismatch mentioned above. Setting the guest-phys-bits
in accordance to the iommu aw-bits seems to fix that for users, e.g.
[0].

Before applying this downstream for pve-qemu, I saw that this patch was
dropped in the v3 [1], but you mentioned that this is addressed in a
later series. I couldn't find a direct follow-up in the archive, are
there any updates on this?


Hello Daniel,

There have been several changes in VFIO since this patch was
submitted. The code will need to be reworked, as it is no longer
possible to check the IOMMU address space width before attaching
the device. At that stage, the IOVA ranges are still unknown.

Since this affects older Intel consumer-grade CPUs (~ 12th gen),
the priority is low. Please open an issue if this support is
important for your users.

That said, vfio_device_get_aw_bits() needs to be improved to be
more robust. I will work on that.

Thanks,

C.


Reply via email to