vfio: Introduce vfio_get_vfio_device()
authorCédric Le Goater <clg@redhat.com>
Thu, 6 Feb 2025 13:14:32 +0000 (14:14 +0100)
committerCédric Le Goater <clg@redhat.com>
Tue, 11 Feb 2025 13:15:19 +0000 (14:15 +0100)
commit80936cf7f38e55f41bf5b482ee04f055c76a0df0
tree86d7717ead3d35f99821be3b8b43088c9f0a7806
parentcdc6f2e0c9fcef2027f4fc5f25ddd15e36283e90
vfio: Introduce vfio_get_vfio_device()

This helper will be useful in the listener handlers to extract the
VFIO device from a memory region using memory_region_owner(). At the
moment, we only care for PCI passthrough devices. If the need arises,
we will add more.

Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250206131438.1505542-5-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/helpers.c
include/hw/vfio/vfio-common.h