Talking of which, why are we passing a 'VFIODevice *' parameter to
HostIOMMUDeviceClass::realize ? I don't see a good reason
I think a 'VFIOContainerBase *' would be more appropriate since
'HostIOMMUDevice' represents a device on the host which is common
to all VFIO devices.
In that case, HostIOMMUDevice::agent wouldn't need to be opaque
anymore. It could simply be a 'VFIOContainerBase *' and
hiod_legacy_vfio_get_iova_ranges() in patch 3 would grab the
'iova_ranges' from the 'VFIOContainerBase *' directly.
This means some rework :
* vfio_device_get_aw_bits() would use a 'VFIOContainerBase *' instead.
* HostIOMMUDevice::name would be removed. This is just for error
messages.
* hiod_iommufd_vfio_realize() would use VFIOIOMMUFDContainer::be.
That said, I think we need the QOMification changes first.