hw/vfio/iommufd: report hint to user when vfio-dev/vfio*/dev is missing
Give a hint about missing kernel config CONFIG_VFIO_DEVICE_CDEV. Reviewed-by: Yi Liu <yi.l.liu@intel.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-ID: <20260319205942.367705-3-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Pierrick Bouvier committed
Mar 19, 2026 at 13:59 UTC
04249f0f9447f4bda1d408e0ed8354d71d784830
1 file changed
+4
-1
hw/vfio/iommufd.c
+4
-1
@@ -274,7 +274,10 @@ static int iommufd_cdev_getfd(const char *sysfs_path, Error **errp)
274
}
275
276
if (!g_file_get_contents(vfio_dev_path, &contents, &length, NULL)) {
277
- error_setg(errp, "failed to load \"%s\"", vfio_dev_path);
277
+ error_setg(errp,
278
+ "failed to load \"%s\""
279
+ " (is your kernel config missing CONFIG_VFIO_DEVICE_CDEV?)",
280
+ vfio_dev_path);
281
goto out_close_dir;
282
}
283