47 lines
1.3 KiB
Diff
47 lines
1.3 KiB
Diff
|
|
From 188948043652fbcdd4505fd9672e57bc61647159 Mon Sep 17 00:00:00 2001
|
||
|
|
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@redhat.com>
|
||
|
|
Date: Tue, 19 Dec 2023 07:58:25 +0100
|
||
|
|
Subject: [PATCH] vfio/iommufd: Remove CONFIG_IOMMUFD usage
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
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>
|
||
|
|
---
|
||
|
|
hw/vfio/common.c | 3 ---
|
||
|
|
1 file changed, 3 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
|
||
|
|
index a8b7129fa5..b5d02df0c2 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>
|
||
|
|
@@ -1652,11 +1651,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);
|
||
|
|
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|