Skip to content
Commit 0cfd027b authored by Eric Auger's avatar Eric Auger Committed by Alex Williamson
Browse files

vfio_pci: Enable memory accesses before calling pci_map_rom

pci_map_rom/pci_get_rom_size() performs memory access in the ROM.
In case the Memory Space accesses were disabled, readw() is likely
to trigger a synchronous external abort on some platforms.

In case memory accesses were disabled, re-enable them before the
call and disable them back again just after.

Fixes: 89e1f7d4

 ("vfio: Add PCI device driver")
Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
Suggested-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 51ef3a00
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment