On 3/17/26 6:55 AM, Cédric Le Goater wrote:
Writing my answer and seeing current behavior, I wonder if we could not have
better error messages simply by checking if /dev/iommu exists when setting the
iommufd property of vfio-pci device or when realizing the iommufd object
(-object iommufd,id=iommufd0). For the latter, I need to double check order or
initialization/realization as it might be tricky to catch before setting
accessing vfio-dev/vfio0/dev.
yes. as said before, QEMU attaches to the device before connecting it
to the IOMMU backend. So the iommufd object is unused until we reach
this step of the device initialization.
$ qemu-system-* -object iommufd,id=iommufd0
can't create iommufd object: /dev/iommu not found
Is your kernel config missing CONFIG_IOMMUFD?
Why not. Would you have time for it ?
Sent a separate series here:
https://lore.kernel.org/qemu-devel/[email protected]/T/#t
Regards,
Pierrick