summary refs log tree commit diff stats
path: root/hw/vfio/iommufd.c
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2024-07-19 13:04:51 +0100
committerCédric Le Goater <clg@redhat.com>2024-07-23 17:14:52 +0200
commit2d1bf2589736b3714f3940d360404732ac13019c (patch)
treed415bb2dc8377c5c42208a8c6b1ca3359c8f597c /hw/vfio/iommufd.c
parent9f17604195c03580b16c3cc5631c86f3894dd442 (diff)
downloadfocaccia-qemu-2d1bf2589736b3714f3940d360404732ac13019c.tar.gz
focaccia-qemu-2d1bf2589736b3714f3940d360404732ac13019c.zip
backends/iommufd: Extend iommufd_backend_get_device_info() to fetch HW capabilities
The helper will be able to fetch vendor agnostic IOMMU capabilities
supported both by hardware and software. Right now it is only iommu dirty
tracking.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Diffstat (limited to 'hw/vfio/iommufd.c')
-rw-r--r--hw/vfio/iommufd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index 7b5f87a148..7c1b9e0284 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
@@ -628,11 +628,13 @@ static bool hiod_iommufd_vfio_realize(HostIOMMUDevice *hiod, void *opaque,
     union {
         struct iommu_hw_info_vtd vtd;
     } data;
+    uint64_t hw_caps;
 
     hiod->agent = opaque;
 
     if (!iommufd_backend_get_device_info(vdev->iommufd, vdev->devid,
-                                         &type, &data, sizeof(data), errp)) {
+                                         &type, &data, sizeof(data),
+                                         &hw_caps, errp)) {
         return false;
     }