qemu-patch-raspberry4/hw/vfio
Alex Williamson e37dac06dc vfio/pci: Hide SR-IOV capability
The kernel currently exposes the SR-IOV capability as read-only
through vfio-pci.  This is sufficient to protect the host kernel, but
has the potential to confuse guests without further virtualization.
In particular, OVMF tries to size the VF BARs and comes up with absurd
results, ending with an assert.  There's not much point in adding
virtualization to a read-only capability, so we simply hide it for
now.  If the kernel ever enables SR-IOV virtualization, we should
easily be able to test it through VF BAR sizing or explicit flags.

Testing whether we should parse extended capabilities is also pulled
into the function to keep these assumptions in one place.

Tested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2016-06-30 13:00:23 -06:00
..
amd-xgbe.c all: Clean up includes 2016-02-23 12:43:05 +00:00
calxeda-xgmac.c hw/vfio: Clean up includes 2016-01-29 15:07:24 +00:00
common.c memory: Add reporting of supported page sizes 2016-06-22 11:13:09 +10:00
Makefile.objs hw/vfio/platform: amd-xgbe device 2016-02-19 09:42:29 -07:00
pci-quirks.c vfio/pci: Fix VGA quirks 2016-06-30 13:00:22 -06:00
pci.c vfio/pci: Hide SR-IOV capability 2016-06-30 13:00:23 -06:00
pci.h vfio/pci: Fix VGA quirks 2016-06-30 13:00:22 -06:00
platform.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
trace-events vfio/pci: Hide SR-IOV capability 2016-06-30 13:00:23 -06:00