Message ID | 20240228035900.1085727-4-zhenzhong.duan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add a host IOMMU device abstraction | expand |
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 {
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(+)