]> www.infradead.org Git - users/willy/pagecache.git/commit
vfio/pci: Expose setup ROM at ROM bar when needed
authorYunxiang Li <Yunxiang.Li@amd.com>
Thu, 2 Jan 2025 18:50:13 +0000 (13:50 -0500)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 6 Jan 2025 15:09:54 +0000 (08:09 -0700)
commite021e6cbfb5a695968afb6619828929a97e4a83a
tree19332c4b641cbb6eab85d6c028e2f0a0acc192af
parentc5a8b5d740ef3dde319562d2e969888b4b8dfdd8
vfio/pci: Expose setup ROM at ROM bar when needed

If ROM bar is missing for any reason, we can fallback to using pdev->rom
to expose the ROM content to the guest. This fixes some passthrough use
cases where the upstream bridge does not have enough address window.

Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Link: https://lore.kernel.org/r/20250102185013.15082-3-Yunxiang.Li@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci_config.c
drivers/vfio/pci/vfio_pci_core.c
drivers/vfio/pci/vfio_pci_rdwr.c