vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler
commit930589520128a5f25e65f9f923ac8dc6fac32ff8
authorZhenzhong Duan <zhenzhong.duan@intel.com>
Wed, 5 Jun 2024 08:30:34 +0000 (5 16:30 +0800)
committerCédric Le Goater <clg@redhat.com>
Mon, 24 Jun 2024 21:15:30 +0000 (24 23:15 +0200)
treeb8b22aef10bf313dfbcad379cab9cdda4299afb5
parent42965386ea21fe375a5a2a6d85261663576d86d9
vfio/iommufd: Implement HostIOMMUDeviceClass::realize() handler

It calls iommufd_backend_get_device_info() to get host IOMMU
related information and translate it into HostIOMMUDeviceCaps
for query with .get_cap().

For aw_bits, use the same way as legacy backend by calling
vfio_device_get_aw_bits() which is common for different vendor
IOMMU.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
hw/vfio/iommufd.c