diff options
author | Cédric Le Goater <clg@redhat.com> | 2023-12-19 07:58:22 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2024-01-05 21:25:20 +0100 |
commit | f221f641a2fe69c2ca3857759551470664b0bec8 (patch) | |
tree | 83780d991ce356d72a825b6a1eae4f30b2053dab /include | |
parent | 61d893f2cdb34a2b0255f9b5fbba6b49b94ff730 (diff) | |
download | qemu-f221f641a2fe69c2ca3857759551470664b0bec8.zip qemu-f221f641a2fe69c2ca3857759551470664b0bec8.tar.gz qemu-f221f641a2fe69c2ca3857759551470664b0bec8.tar.bz2 |
vfio/spapr: Introduce a sPAPR VFIOIOMMU QOM interface
Move vfio_spapr_container_setup() to a VFIOIOMMUClass::setup handler
and convert the sPAPR VFIOIOMMUOps struct to a QOM interface. The
sPAPR QOM interface inherits from the legacy QOM interface because
because both have the same basic needs. The sPAPR interface is then
extended with the handlers specific to the sPAPR IOMMU.
This allows reuse and provides better abstraction of the backends. It
will be useful to avoid compiling the sPAPR IOMMU backend on targets
not supporting it.
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/vfio/vfio-container-base.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h index ce8b1fb..9e21d78 100644 --- a/include/hw/vfio/vfio-container-base.h +++ b/include/hw/vfio/vfio-container-base.h @@ -95,6 +95,7 @@ void vfio_container_destroy(VFIOContainerBase *bcontainer); #define TYPE_VFIO_IOMMU "vfio-iommu" #define TYPE_VFIO_IOMMU_LEGACY TYPE_VFIO_IOMMU "-legacy" +#define TYPE_VFIO_IOMMU_SPAPR TYPE_VFIO_IOMMU "-spapr" /* * VFIOContainerBase is not an abstract QOM object because it felt |