]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio: add region info cache
authorJohn Levon <john.levon@nutanix.com>
Wed, 7 May 2025 15:20:16 +0000 (16:20 +0100)
committerCédric Le Goater <clg@redhat.com>
Fri, 9 May 2025 10:42:28 +0000 (12:42 +0200)
commit95cdb024515b107e2574c5cbef0a43cafa0db77f
treee2038e47dadf6d74de9ff47fbea76610a87224d8
parent38bf025d0dc80c1ae6e8f36093c5145c08b332d9
vfio: add region info cache

Instead of requesting region information on demand with
VFIO_DEVICE_GET_REGION_INFO, maintain a cache: this will become
necessary for performance for vfio-user, where this call becomes a
message over the control socket, so is of higher overhead than the
traditional path.

We will also need it to generalize region accesses, as that means we
can't use ->config_offset for configuration space accesses, but must
look up the region offset (if relevant) each time.

Originally-by: John Johnson <john.g.johnson@oracle.com>
Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250507152020.1254632-12-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/ccw.c
hw/vfio/device.c
hw/vfio/igd.c
hw/vfio/pci.c
hw/vfio/region.c
include/hw/vfio/vfio-device.h