mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
vfio/container: Introduce a VFIOIOMMU QOM interface
VFIOContainerBase was not introduced as an abstract QOM object because it felt unnecessary to expose all the IOMMU backends to the QEMU machine and human interface. However, we can still abstract the IOMMU backend handlers using a QOM interface class. This provides more flexibility when referencing the various implementations. Simply transform the VFIOIOMMUOps struct in an InterfaceClass and do some initial name replacements. Next changes will start converting VFIOIOMMUOps. 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>
This commit is contained in:
parent
bffe92af0e
commit
fdaa774e67
4 changed files with 32 additions and 7 deletions
|
@ -2488,7 +2488,7 @@ int vfio_pci_get_pci_hot_reset_info(VFIOPCIDevice *vdev,
|
|||
static int vfio_pci_hot_reset(VFIOPCIDevice *vdev, bool single)
|
||||
{
|
||||
VFIODevice *vbasedev = &vdev->vbasedev;
|
||||
const VFIOIOMMUOps *ops = vbasedev->bcontainer->ops;
|
||||
const VFIOIOMMUClass *ops = vbasedev->bcontainer->ops;
|
||||
|
||||
return ops->pci_hot_reset(vbasedev, single);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue