vfio/pci: Hide Resizable BAR capability
commit3412d8ec9810b819f8b79e8e0c6b87217c876e32
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 13 Jun 2019 15:57:36 +0000 (13 09:57 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 13 Jun 2019 15:57:36 +0000 (13 09:57 -0600)
tree66bd1fc7f5d01f6b4468dddc19e10230e964fc61
parent650a379d505bf558bcb41124bc6c951a76cbc113
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>
hw/vfio/pci.c