Using iommufd requires two different kernel config:
CONFIG_IOMMUFD and CONFIG_VFIO_DEVICE_CDEV
https://docs.kernel.org/driver-api/vfio.html#vfio-device-cdev
It can be complex to identify what is missing when trying to use it. This series
gives hints to user about it.
Suggested on:
https://lore.kernel.org/qemu-devel/0cc139d6-9289-44a0-9122-d701426dae0c@linaro.org/
Tested using a cross compiled QEMU and a custom kernel + debian rootfs [1].
[1] https://github.com/p-b-o/qemu-linux-stack/tree/device_passthrough
v3
--
- more accurate check for /dev/iommu presence in iommufd_backend_complete
v2
--
- Move /dev/iommu to iommufd_backend_complete, so we can report the error
instead of aborting.
Pierrick Bouvier (2):
backends/iommufd.c: report error when /dev/iommu is not available
hw/vfio/iommufd.c: report hint to user when vfio-dev/vfio*/dev is
missing
backends/iommufd.c | 3 +++
hw/vfio/iommufd.c | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.47.3