Hi,
On 11/4/25 12:17, Zhenzhong Duan wrote:
Previously device attaching depends on realize() getting host iommu
capabilities to check dirty tracking support.
Now we save a caps copy in VFIODevice and check that copy for dirty
tracking support, there is no dependency any more, move realize()
call after attach_device() call in vfio_device_attach().
Drop vfio_device_hiod_realize() which looks redundant now.
Suggested-by: Cédric Le Goater <c...@redhat.com>
Suggested-by: Donald Dutile <ddut...@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.d...@intel.com>
---
include/hw/vfio/vfio-device.h | 1 -
hw/vfio/container.c | 4 ----
hw/vfio/device.c | 28 +++++++++++-----------------
hw/vfio/iommufd.c | 4 ----
4 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/include/hw/vfio/vfio-device.h b/include/hw/vfio/vfio-device.h
index 09a7af891a..14559733c6 100644
--- a/include/hw/vfio/vfio-device.h
+++ b/include/hw/vfio/vfio-device.h
@@ -124,7 +124,6 @@ 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);
Pre-existing, but can we add documentation about what vfio_device_attach
does, in particular in which state is the device once attached (or if
attachment failed)?
bool vfio_device_attach(char *name, VFIODevice *vbasedev,
AddressSpace *as, Error **errp);
void vfio_device_detach(VFIODevice *vbasedev);