summary refs log tree commit diff stats
path: root/hw/vfio/common.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@redhat.com>2025-03-26 08:51:04 +0100
committerCédric Le Goater <clg@redhat.com>2025-04-25 09:01:37 +0200
commit005b8d10450d2d41e9c1bcf8da4085f23cb85b76 (patch)
tree2f71eb772c96d4e541eeb4e04c59c0b125da5abd /hw/vfio/common.c
parent545256134fdcac6c342f8e7f45eb591e3b12c700 (diff)
downloadfocaccia-qemu-005b8d10450d2d41e9c1bcf8da4085f23cb85b76.tar.gz
focaccia-qemu-005b8d10450d2d41e9c1bcf8da4085f23cb85b76.zip
vfio: Move vfio_get_device_info() to helpers.c
vfio_get_device_info() is a low level routine. Move it with the other
helpers.

Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-19-clg@redhat.com
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-20-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/common.c')
-rw-r--r--hw/vfio/common.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 2b3af051cc..f80c0ef229 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -1333,30 +1333,6 @@ void vfio_reset_handler(void *opaque)
     }
 }
 
-struct vfio_device_info *vfio_get_device_info(int fd)
-{
-    struct vfio_device_info *info;
-    uint32_t argsz = sizeof(*info);
-
-    info = g_malloc0(argsz);
-
-retry:
-    info->argsz = argsz;
-
-    if (ioctl(fd, VFIO_DEVICE_GET_INFO, info)) {
-        g_free(info);
-        return NULL;
-    }
-
-    if (info->argsz > argsz) {
-        argsz = info->argsz;
-        info = g_realloc(info, argsz);
-        goto retry;
-    }
-
-    return info;
-}
-
 bool vfio_attach_device(char *name, VFIODevice *vbasedev,
                         AddressSpace *as, Error **errp)
 {