summaryrefslogtreecommitdiffstats
path: root/hw/vfio/pci.c
diff options
context:
space:
mode:
authorAlex Williamson2019-06-13 17:57:36 +0200
committerAlex Williamson2019-06-13 17:57:36 +0200
commit3412d8ec9810b819f8b79e8e0c6b87217c876e32 (patch)
tree66bd1fc7f5d01f6b4468dddc19e10230e964fc61 /hw/vfio/pci.c
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190613-... (diff)
downloadqemu-3412d8ec9810b819f8b79e8e0c6b87217c876e32.tar.gz
qemu-3412d8ec9810b819f8b79e8e0c6b87217c876e32.tar.xz
qemu-3412d8ec9810b819f8b79e8e0c6b87217c876e32.zip
vfio/pci: Hide Resizable BAR capability
The resizable BAR capability is currently exposed read-only from the kernel and we don't yet implement a protocol for virtualizing it to the VM. Exposing it to the guest read-only introduces poor behavior as the guest has no reason to test that a control register write is accepted by the hardware. This can lead to cases where the guest OS assumes the BAR has been resized, but it hasn't. This has been observed when assigning AMD Vega GPUs. Note, this does not preclude future enablement of resizable BARs, but it's currently incorrect to expose this capability as read-only, so better to not expose it at all. Reported-by: James Courtier-Dutton <james.dutton@gmail.com> Tested-by: James Courtier-Dutton <james.dutton@gmail.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio/pci.c')
-rw-r--r--hw/vfio/pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 4a04f79516..48f4e19a02 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -2119,6 +2119,7 @@ static void vfio_add_ext_cap(VFIOPCIDevice *vdev)
case 0: /* kernel masked capability */
case PCI_EXT_CAP_ID_SRIOV: /* Read-only VF BARs confuse OVMF */
case PCI_EXT_CAP_ID_ARI: /* XXX Needs next function virtualization */
+ case PCI_EXT_CAP_ID_REBAR: /* Can't expose read-only */
trace_vfio_add_ext_cap_dropped(vdev->vbasedev.name, cap_id, next);
break;
default: