aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2023-12-19 07:58:25 +0100
committerCédric Le Goater <clg@redhat.com>2024-01-05 21:25:20 +0100
commitc1139fa4feba8c320e4bd0a4e34af55caa5ffbb9 (patch)
treeef8e16227951df5bc66580b9fc144fdccc00de66 /hw
parent10164df6ed3d41cbf67105dcd954a663ef4cc3e9 (diff)
downloadqemu-c1139fa4feba8c320e4bd0a4e34af55caa5ffbb9.zip
qemu-c1139fa4feba8c320e4bd0a4e34af55caa5ffbb9.tar.gz
qemu-c1139fa4feba8c320e4bd0a4e34af55caa5ffbb9.tar.bz2
vfio/iommufd: Remove CONFIG_IOMMUFD usage
Availability of the IOMMUFD backend can now be fully determined at runtime and the ifdef check was a build time protection (for PPC not supporting it mostly). Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Tested-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/vfio/common.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 89ff1c7..0d4d8b8 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -19,7 +19,6 @@
*/
#include "qemu/osdep.h"
-#include CONFIG_DEVICES /* CONFIG_IOMMUFD */
#include <sys/ioctl.h>
#ifdef CONFIG_KVM
#include <linux/kvm.h>
@@ -1506,11 +1505,9 @@ int vfio_attach_device(char *name, VFIODevice *vbasedev,
const VFIOIOMMUClass *ops =
VFIO_IOMMU_CLASS(object_class_by_name(TYPE_VFIO_IOMMU_LEGACY));
-#ifdef CONFIG_IOMMUFD
if (vbasedev->iommufd) {
ops = VFIO_IOMMU_CLASS(object_class_by_name(TYPE_VFIO_IOMMU_IOMMUFD));
}
-#endif
assert(ops);