[PATCH 0/1] KVM support for VMD devices

Jon Derrick posted 1 patch 4 years ago
Only 0 patches received!
drivers/pci/controller/vmd.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
[PATCH 0/1] KVM support for VMD devices
Posted by Jon Derrick 4 years ago
The two patches (Linux & QEMU) add support for passthrough VMD devices
in QEMU/KVM. VMD device 28C0 already supports passthrough natively by
providing the Host Physical Address in a shadow register to the guest
for correct bridge programming.

The QEMU patch emulates the 28C0 mode by creating a shadow register and
advertising its support by using QEMU's subsystem vendor/id.
The Linux patch matches the QEMU subsystem vendor/id to use the shadow
register.

Jon Derrick (1):
  pci: vmd: Use Shadow MEMBAR registers for QEMU/KVM guests

 drivers/pci/controller/vmd.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.18.1


Re: [PATCH 0/1] KVM support for VMD devices
Posted by Christoph Hellwig 4 years ago
On Wed, Apr 22, 2020 at 01:14:44PM -0400, Jon Derrick wrote:
> The two patches (Linux & QEMU) add support for passthrough VMD devices
> in QEMU/KVM. VMD device 28C0 already supports passthrough natively by
> providing the Host Physical Address in a shadow register to the guest
> for correct bridge programming.
> 
> The QEMU patch emulates the 28C0 mode by creating a shadow register and
> advertising its support by using QEMU's subsystem vendor/id.
> The Linux patch matches the QEMU subsystem vendor/id to use the shadow
> register.

Please pick a different PCI ID for Qemu vs real hardware so that we
can properly quirk them if they end up behaving differently due to
hardware or software bugs.

Re: [PATCH 0/1] KVM support for VMD devices
Posted by Derrick, Jonathan 4 years ago
On Wed, 2020-04-22 at 23:16 -0700, Christoph Hellwig wrote:
> On Wed, Apr 22, 2020 at 01:14:44PM -0400, Jon Derrick wrote:
> > The two patches (Linux & QEMU) add support for passthrough VMD devices
> > in QEMU/KVM. VMD device 28C0 already supports passthrough natively by
> > providing the Host Physical Address in a shadow register to the guest
> > for correct bridge programming.
> > 
> > The QEMU patch emulates the 28C0 mode by creating a shadow register and
> > advertising its support by using QEMU's subsystem vendor/id.
> > The Linux patch matches the QEMU subsystem vendor/id to use the shadow
> > register.
> 
> Please pick a different PCI ID for Qemu vs real hardware so that we
> can properly quirk them if they end up behaving differently due to
> hardware or software bugs.

Sure. Will look into that.
Thanks Christoph

Jon