On Fri, Apr 04, 2025 at 06:57:46PM +0200, Cédric Le Goater wrote: > > > why not populate vbasedev->regions[index] in vfio_get_all_regions() ? > > > > Good question. I presume it's not possible for us to ever look up a region > > that has somehow appeared *after* vfio_prepare_device() ? > > > > We'd end up off the end of the array in that case anyway. > > I was confused. I thought we were caching VFIORegions ... > > Anyway, this is an optimisation and I fail to understand where > the VFIO_DEVICE_GET_REGION_INFO ioctl is called on a hot path. > > Is it for interrupts ? Please explain. > > Do you have figures ?
That's a great question that I don't know the answer to (like much of this code I just inherited it). Let me try to investigate. regards john