PCI: vmd: Use Shadow MEMBAR registers for QEMU/KVM guests
authorJon Derrick <jonathan.derrick@intel.com>
Thu, 28 May 2020 03:02:40 +0000 (23:02 -0400)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 6 Jul 2020 09:14:29 +0000 (10:14 +0100)
commit51f939b11cb1c47ed2a8d56b23f25483b7363f8e
treedf693bfa8e9bed451ff19e04cca46eda62c292e3
parentb3a9e3b9622ae10064826dccb4f7a52bd88c7407
PCI: vmd: Use Shadow MEMBAR registers for QEMU/KVM guests

VMD device 28C0 natively assists guest passthrough of the VMD endpoint
through the use of shadow registers that provide Host Physical Addresses
to correctly assign bridge windows. These shadow registers are only
available if VMD config space register 0x70, bit 1 is set.

In order to support this mode in existing VMD devices which don't
natively support the shadow register, it was decided that the hypervisor
could offer the shadow registers in a vendor-specific PCI capability.

QEMU has been modified to create this vendor-specific capability and
supply the shadow membar registers for VMDs which don't natively support
this feature. This patch adds this mode and updates the supported device
list to allow this feature to be used on these VMDs.

Link: https://lore.kernel.org/r/20200528030240.16024-4-jonathan.derrick@intel.com
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/vmd.c