[PATCH for-9.0 10/10] vfio/iommufd: Remove CONFIG_IOMMUFD usage

Cédric Le Goater posted 10 patches 11 months, 3 weeks ago
There is a newer version of this series
[PATCH for-9.0 10/10] vfio/iommufd: Remove CONFIG_IOMMUFD usage
Posted by Cédric Le Goater 11 months, 3 weeks ago
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).

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 89ff1c7aeda14d20b2e24f8bc251db0a71d4527c..0d4d8b8416c6a4770677e1ebe5e1fc7dbaaef004 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);
 
-- 
2.43.0


RE: [PATCH for-9.0 10/10] vfio/iommufd: Remove CONFIG_IOMMUFD usage
Posted by Duan, Zhenzhong 11 months, 3 weeks ago

>-----Original Message-----
>From: Cédric Le Goater <clg@redhat.com>
>Subject: [PATCH for-9.0 10/10] 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).
>
>Signed-off-by: Cédric Le Goater <clg@redhat.com>

Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>

Thanks
Zhenzhong