aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZhenzhong Duan <zhenzhong.duan@intel.com>2025-04-23 15:28:23 +0800
committerCédric Le Goater <clg@redhat.com>2025-04-25 09:01:38 +0200
commit0805f829a1aa07888fa7378f9421d37c521c4193 (patch)
treee39c6d3132eefd6e5f3b0a3cf6124b6cc2d370fe /include
parent0327ffc8530e9733526fab6c790ad5f0661b008d (diff)
downloadqemu-0805f829a1aa07888fa7378f9421d37c521c4193.zip
qemu-0805f829a1aa07888fa7378f9421d37c521c4193.tar.gz
qemu-0805f829a1aa07888fa7378f9421d37c521c4193.tar.bz2
vfio: Cleanup host IOMMU device creation
realize() is now moved after attachment, do the same for hiod creation. Introduce a new function vfio_device_hiod_create_and_realize() to do them all in one go. Suggested-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20250423072824.3647952-5-zhenzhong.duan@intel.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/vfio/vfio-device.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h
index 696ed87..81c95bb 100644
--- a/include/hw/vfio/vfio-device.h
+++ b/include/hw/vfio/vfio-device.h
@@ -123,7 +123,8 @@ bool vfio_device_irq_set_signaling(VFIODevice *vbasedev, int index, int subindex
void vfio_device_reset_handler(void *opaque);
bool vfio_device_is_mdev(VFIODevice *vbasedev);
-bool vfio_device_hiod_realize(VFIODevice *vbasedev, Error **errp);
+bool vfio_device_hiod_create_and_realize(VFIODevice *vbasedev,
+ const char *typename, Error **errp);
bool vfio_device_attach(char *name, VFIODevice *vbasedev,
AddressSpace *as, Error **errp);
void vfio_device_detach(VFIODevice *vbasedev);