On Mon, May 26, 2025 at 02:08:41PM +0200, Cédric Le Goater wrote: > > > Would this work ? > > > > > > vbasedev->region_fds ? vbasedev->region_fds[region->nr] : > > > vbasedev->fd, > > > > That is, region->fd is *always* correct, and there is less chance of a bug > > where > > somebody incorrectly uses vbasedev fd instead. IMO "region->fd" is much > > cleaner/clearer. > > maybe. It's only used in one place : vfio_region_mmap(). I think caching the > fd value under VFIORegion is overkill.
OK, will do. thanks john