vfio/pci: Replace vfio_pci_core_setup_barmap() with vfio_pci_core_get_iomap()

Since "vfio/pci: Set up barmap in vfio_pci_core_enable()", the
resource request and iomap for the BARs was performed early, and
vfio_pci_core_setup_barmap() just checks those actions succeeded.

Move this logic to a new helper that checks success and returns the
iomap address, replacing the various bare vdev->barmap[] lookups.
This maintains the error behaviour of the previous on-demand
vfio_pci_core_setup_barmap() scheme.

Signed-off-by: Matt Evans <mattev@meta.com>
Link: https://lore.kernel.org/r/20260511145829.2993601-4-mattev@meta.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
This commit is contained in:
Matt Evans 2026-05-11 07:58:25 -07:00 • committed by Alex Williamson
commit 859dc0f625
6 changed files with 52 additions and 44 deletions