From ce5f6d49f5845c3b9955cc377a5223c3f8d7ba1e Mon Sep 17 00:00:00 2001 From: Cédric Le Goater Date: Tue, 19 Dec 2023 07:58:23 +0100 Subject: vfio/iommufd: Introduce a VFIOIOMMU iommufd QOM interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As previously done for the sPAPR and legacy IOMMU backends, convert the VFIOIOMMUOps struct to a QOM interface. The set of of operations for this backend can be referenced with a literal typename instead of a C struct. Reviewed-by: Zhenzhong Duan Tested-by: Eric Farman Signed-off-by: Cédric Le Goater --- hw/vfio/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/vfio/common.c') diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 2329d0efc8..89ff1c7aed 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -1508,7 +1508,7 @@ int vfio_attach_device(char *name, VFIODevice *vbasedev, #ifdef CONFIG_IOMMUFD if (vbasedev->iommufd) { - ops = &vfio_iommufd_ops; + ops = VFIO_IOMMU_CLASS(object_class_by_name(TYPE_VFIO_IOMMU_IOMMUFD)); } #endif -- cgit 1.4.1