qemu/hw/misc
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
..
macio qom: Pass available size to object_initialize() 2013-08-30 21:15:44 +02:00
a9scu.c hw/m*: pass owner to memory_region_init* functions 2013-07-04 17:42:48 +02:00
applesmc.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
arm_l2x0.c arm_l2x0: QOM cast cleanup 2013-07-29 21:06:58 +02:00
arm_sysctl.c aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
cbus.c arm: fix location of some include files 2013-04-15 15:16:01 +02:00
debugexit.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
eccmemctl.c eccmemctl: QOM cast cleanup 2013-07-29 21:06:58 +02:00
exynos4210_pmu.c exynos4210_pmu: QOM cast cleanup 2013-07-29 21:06:58 +02:00
imx_ccm.c imx_ccm: QOM cast cleanup 2013-07-29 21:06:05 +02:00
ivshmem.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
lm32_sys.c lm32_sys: QOM cast cleanup 2013-07-29 21:06:58 +02:00
Makefile.objs introduce a new qom device to deal with panicked event 2013-04-30 10:30:01 -05:00
max111x.c
milkymist-hpdmc.c milkymist-hpdmc: QOM cast cleanup 2013-07-29 21:06:58 +02:00
milkymist-pfpu.c milkymist-pfpu: QOM cast cleanup 2013-07-29 21:06:58 +02:00
mst_fpga.c mst_fpga: QOM cast cleanup 2013-07-29 21:06:59 +02:00
omap_clk.c hw: move other devices to hw/misc/, configure with default-configs/ 2013-04-08 18:13:16 +02:00
omap_gpmc.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_l4.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_sdrc.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
omap_tap.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
pc-testdev.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
pci-testdev.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
puv3_pm.c puv3_pm: QOM cast cleanup 2013-07-29 21:06:59 +02:00
pvpanic.c hw/misc: make pvpanic known to user 2013-08-12 11:20:57 -05:00
pxa2xx_pcmcia.c memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
sga.c devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
slavio_misc.c slavio_misc: QOM cast cleanup for APCState 2013-07-29 21:06:59 +02:00
tmp105.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
tmp105.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
vfio.c vfio-pci: Lazy PCI option ROM loading 2013-10-02 12:52:38 -06:00
vmport.c cpu: Replace cpu_single_env with CPUState current_cpu 2013-07-09 21:20:28 +02:00
zynq_slcr.c zynq_slcr: QOM cast cleanup 2013-07-29 21:06:59 +02:00