diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2016-06-30 13:00:23 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-06-30 13:00:23 -0600 |
commit | e37dac06dc4e85a2f46c24261c0dfdf2a30b50e3 (patch) | |
tree | d757086868b65eb07c682f80c6fd4c7b09b9c141 /hw/vfio/trace-events | |
parent | 325ae8d548ebeee99cbebd38e2ff0909a9081c50 (diff) | |
download | qemu-e37dac06dc4e85a2f46c24261c0dfdf2a30b50e3.zip qemu-e37dac06dc4e85a2f46c24261c0dfdf2a30b50e3.tar.gz qemu-e37dac06dc4e85a2f46c24261c0dfdf2a30b50e3.tar.bz2 |
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>
Diffstat (limited to 'hw/vfio/trace-events')
-rw-r--r-- | hw/vfio/trace-events | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index 9da0ff9..a768fb5 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -37,6 +37,7 @@ vfio_pci_hot_reset_result(const char *name, const char *result) "%s hot reset: % vfio_populate_device_config(const char *name, unsigned long size, unsigned long offset, unsigned long flags) "Device %s config:\n size: 0x%lx, offset: 0x%lx, flags: 0x%lx" vfio_populate_device_get_irq_info_failure(void) "VFIO_DEVICE_GET_IRQ_INFO failure: %m" vfio_initfn(const char *name, int group_id) " (%s) group %d" +vfio_add_ext_cap_dropped(const char *name, uint16_t cap, uint16_t offset) "%s %x@%x" vfio_pci_reset(const char *name) " (%s)" vfio_pci_reset_flr(const char *name) "%s FLR/VFIO_DEVICE_RESET" vfio_pci_reset_pm(const char *name) "%s PCI PM Reset" |