Skip to contentSkip to conversation

KVM support for VMD devices

PATCH In review Jon Derrick 2 participants 3 messages Apr 22, 2020 – Apr 23, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover KVM support for VMD devices

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(-)
Signature · 1 line
2.18.1
#1 lore raw
Quoted 9 lines · Jon Derrick

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.

#2 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Jon Derrick

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.

Quoted 8 lines
Quoted 4 lines

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