[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 41/41] vfio: Compile out iommufd for PPC target
|
From: |
Zhenzhong Duan |
|
Subject: |
[PATCH v4 41/41] vfio: Compile out iommufd for PPC target |
|
Date: |
Thu, 2 Nov 2023 15:13:02 +0800 |
Since PPC doesn't support IOMMUFD, make iommufd related code
compiled out.
Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
hw/vfio/common.c | 2 +-
hw/vfio/pci.c | 2 +-
hw/vfio/platform.c | 2 +-
backends/meson.build | 4 ++--
hw/vfio/meson.build | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 1c9203183d..000717cef3 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -1504,7 +1504,7 @@ int vfio_attach_device(char *name, VFIODevice *vbasedev,
{
const VFIOIOMMUOps *ops;
-#ifdef CONFIG_IOMMUFD
+#if defined(CONFIG_IOMMUFD) && !defined(TARGET_PPC)
if (vbasedev->iommufd) {
ops = &vfio_iommufd_ops;
} else
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index d8f658ea47..2287e45119 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3550,7 +3550,7 @@ static Property vfio_pci_dev_properties[] = {
qdev_prop_nv_gpudirect_clique, uint8_t),
DEFINE_PROP_OFF_AUTO_PCIBAR("x-msix-relocation", VFIOPCIDevice, msix_relo,
OFF_AUTOPCIBAR_OFF),
-#ifdef CONFIG_IOMMUFD
+#if defined(CONFIG_IOMMUFD) && !defined(TARGET_PPC)
DEFINE_PROP_LINK("iommufd", VFIOPCIDevice, vbasedev.iommufd,
TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *),
#endif
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index aa0b2b9583..c8f4ae5a06 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -648,7 +648,7 @@ static Property vfio_platform_dev_properties[] = {
DEFINE_PROP_UINT32("mmap-timeout-ms", VFIOPlatformDevice,
mmap_timeout, 1100),
DEFINE_PROP_BOOL("x-irqfd", VFIOPlatformDevice, irqfd_allowed, true),
-#ifdef CONFIG_IOMMUFD
+#if defined(CONFIG_IOMMUFD) && !defined(TARGET_PPC)
DEFINE_PROP_LINK("iommufd", VFIOPlatformDevice, vbasedev.iommufd,
TYPE_IOMMUFD_BACKEND, IOMMUFDBackend *),
#endif
diff --git a/backends/meson.build b/backends/meson.build
index 05ac57ff15..9dbdfa87f7 100644
--- a/backends/meson.build
+++ b/backends/meson.build
@@ -21,9 +21,9 @@ if have_vhost_user
endif
system_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true:
files('cryptodev-vhost.c'))
if have_iommufd
- system_ss.add(files('iommufd.c'))
+ system_ss.add(when: 'TARGET_PPC', if_false: files('iommufd.c'))
else
- system_ss.add(files('iommufd-stub.c'))
+ system_ss.add(when: 'TARGET_PPC', if_false: files('iommufd-stub.c'))
endif
if have_vhost_user_crypto
system_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true:
files('cryptodev-vhost-user.c'))
diff --git a/hw/vfio/meson.build b/hw/vfio/meson.build
index 9cae2c9e21..4423bb3cd4 100644
--- a/hw/vfio/meson.build
+++ b/hw/vfio/meson.build
@@ -8,7 +8,7 @@ vfio_ss.add(files(
'migration.c',
))
if have_iommufd
- vfio_ss.add(files('iommufd.c'))
+ vfio_ss.add(when: 'TARGET_PPC', if_false: files('iommufd.c'))
endif
vfio_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files(
'display.c',
--
2.34.1
- [PATCH v4 34/41] vfio/pci: Allow the selection of a given iommu backend, (continued)
- [PATCH v4 34/41] vfio/pci: Allow the selection of a given iommu backend, Zhenzhong Duan, 2023/11/02
- [PATCH v4 35/41] vfio/pci: Make vfio cdev pre-openable by passing a file handle, Zhenzhong Duan, 2023/11/02
- [PATCH v4 37/41] vfio/platform: Make vfio cdev pre-openable by passing a file handle, Zhenzhong Duan, 2023/11/02
- [PATCH v4 36/41] vfio: Allow the selection of a given iommu backend for platform ap and ccw, Zhenzhong Duan, 2023/11/02
- [PATCH v4 38/41] vfio/ap: Make vfio cdev pre-openable by passing a file handle, Zhenzhong Duan, 2023/11/02
- [PATCH v4 39/41] vfio/ccw: Make vfio cdev pre-openable by passing a file handle, Zhenzhong Duan, 2023/11/02
- [PATCH v4 40/41] vfio: Make VFIOContainerBase poiner parameter const in VFIOIOMMUOps callbacks, Zhenzhong Duan, 2023/11/02
- [PATCH v4 41/41] vfio: Compile out iommufd for PPC target,
Zhenzhong Duan <=
- Re: [PATCH v4 00/41] vfio: Adopt iommufd, Cédric Le Goater, 2023/11/06
- Re: [PATCH v4 00/41] vfio: Adopt iommufd, Cédric Le Goater, 2023/11/07
- Re: [PATCH v4 00/41] vfio: Adopt iommufd, Cédric Le Goater, 2023/11/08