[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 03/11] vfio: Introduce IOMMULegacyDevice
From: |
Zhenzhong Duan |
Subject: |
[PATCH v1 03/11] vfio: Introduce IOMMULegacyDevice |
Date: |
Wed, 28 Feb 2024 11:58:52 +0800 |
Similar as IOMMUFDDevice, IOMMULegacyDevice represents a device in
legacy mode and can be used as a communication interface between
devices (i.e., VFIO, VDPA) and vIOMMU.
Currently it includes nothing legacy specific, but could be extended
with any wanted info of legacy mode when necessary.
IOMMULegacyDevice is willingly not a QOM object because we don't want
it to be visible from the user interface.
Suggested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
include/hw/vfio/vfio-common.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index 9b7ef7d02b..8bfb9cbe94 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -31,6 +31,7 @@
#endif
#include "sysemu/sysemu.h"
#include "hw/vfio/vfio-container-base.h"
+#include "sysemu/host_iommu_device.h"
#define VFIO_MSG_PREFIX "vfio %s: "
@@ -97,6 +98,11 @@ typedef struct VFIOIOMMUFDContainer {
uint32_t ioas_id;
} VFIOIOMMUFDContainer;
+/* Abstraction of host IOMMU legacy device */
+typedef struct IOMMULegacyDevice {
+ HostIOMMUDevice base;
+} IOMMULegacyDevice;
+
typedef struct VFIODeviceOps VFIODeviceOps;
typedef struct VFIODevice {
--
2.34.1
- [PATCH v1 00/11] Add a host IOMMU device abstraction, Zhenzhong Duan, 2024/02/27
- [PATCH v1 02/11] backends/iommufd: Introduce IOMMUFDDevice, Zhenzhong Duan, 2024/02/27
- [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice, Zhenzhong Duan, 2024/02/27
- [PATCH v1 03/11] vfio: Introduce IOMMULegacyDevice,
Zhenzhong Duan <=
- [PATCH v1 04/11] vfio: Add HostIOMMUDevice handle into VFIODevice, Zhenzhong Duan, 2024/02/27
- [PATCH v1 07/11] vfio/iommufd: Implement host_iommu_device_create callback in iommufd mode, Zhenzhong Duan, 2024/02/27
- [PATCH v1 08/11] vfio/pci: Allocate and initialize HostIOMMUDevice after attachment, Zhenzhong Duan, 2024/02/27
- [PATCH v1 06/11] vfio/container: Implement host_iommu_device_create callback in legacy mode, Zhenzhong Duan, 2024/02/27
- [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback, Zhenzhong Duan, 2024/02/27
- [PATCH v1 09/11] hw/pci: Introduce pci_device_set/unset_iommu_device(), Zhenzhong Duan, 2024/02/27
- [PATCH v1 10/11] vfio: Pass HostIOMMUDevice to vIOMMU, Zhenzhong Duan, 2024/02/27
- [PATCH v1 11/11] backends/iommufd: Introduce helper function iommufd_device_get_info(), Zhenzhong Duan, 2024/02/27