qemu-e2k/hw
Alex Williamson 6f864e6ec8 vfio-pci: Lazy PCI option ROM loading
During vfio-pci initfn, the device is not always in a state where the
option ROM can be read.  In the case of graphics cards, there's often
no per function reset, which means we have host driver state affecting
whether the option ROM is usable.  Ideally we want to move reading the
option ROM past any co-assigned device resets to the point where the
guest first tries to read the ROM itself.

To accomplish this, we switch the memory region for the option rom to
an I/O region rather than a memory mapped region.  This has the side
benefit that we don't waste KVM memory slots for a BAR where we don't
care about performance.  This also allows us to delay loading the ROM
from the device until the first read by the guest.  We then use the
PCI config space size of the ROM BAR when setting up the BAR through
QEMU PCI.

Another benefit of this approach is that previously when a user set
the ROM to a file using the romfile= option, we still probed VFIO for
the parameters of the ROM, which can result in dmesg errors about an
invalid ROM.  We now only probe VFIO to get the ROM contents if the
guest actually tries to read the ROM.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-10-02 12:52:38 -06:00
..
9pfs
acpi pc,pci,virtio fixes and cleanups 2013-09-30 17:15:01 -05:00
alpha pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
arm QOM CPUState refactorings / X86CPU 2013-09-03 12:33:32 -05:00
audio audio: remove CONFIG_MIXEMU configure option 2013-09-24 10:29:34 +02:00
block virtio-blk: do not relay a previous driver's WCE configuration to the current 2013-09-20 19:27:48 +02:00
bt Preparation for usb-bt-dongle conditional build 2013-09-10 11:14:41 +02:00
char s390/sclplmconsole: Add support for SCLP line-mode console 2013-09-20 13:55:30 +02:00
core pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
cpu QOM CPUState refactorings / X86CPU 2013-09-03 12:33:32 -05:00
cris
display qxl: compile only once 2013-09-18 11:13:29 +02:00
dma
gpio
i2c
i386 pc,pci,virtio fixes and cleanups 2013-09-30 17:15:01 -05:00
ide
input
intc
isa
lm32
m68k
microblaze
mips mips_malta: support up to 2GiB RAM 2013-09-09 18:42:22 +02:00
misc vfio-pci: Lazy PCI option ROM loading 2013-10-02 12:52:38 -06:00
moxie
net pc,pci,virtio fixes and cleanups 2013-09-30 17:15:01 -05:00
nvram
openrisc pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
pci pci: remove explicit check to 64K ioport size 2013-09-15 11:49:51 +03:00
pci-bridge
pci-host pc,pci,virtio fixes and cleanups 2013-09-30 17:15:01 -05:00
ppc QOM CPUState refactorings / X86CPU 2013-09-03 12:33:32 -05:00
s390x s390/eventfacility: allow childs to handle more than 1 event type 2013-09-20 13:55:30 +02:00
scsi lsi: add 53C810 variant 2013-09-16 12:42:40 +02:00
sd
sh4
sparc
sparc64 pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
ssi
timer
tpm
unicore32
usb usb: Fix iovec memleak on combined-packet free 2013-09-19 11:28:40 +02:00
virtio pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
watchdog
xen
xtensa pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
Makefile.objs