mbox series

[0/3] Support getting p2pdma_distance

Message ID 20241207105537.542441-1-julia.zhang@amd.com (mailing list archive)
Headers show
Series Support getting p2pdma_distance | expand

Message

Zhang, Julia Dec. 7, 2024, 10:55 a.m. UTC
To implement dGPU prime feature, virtgpu needs to import/export buffer
between virtio iGPU and passthrough dGPU. Before that, virtgpu has to
checkout p2pdma_distance. But calling function pci_p2pdma_distance in guest
VM will only get virtual p2pdma_distance instead of real physical
p2pdma_distance.

This series is to support handling the new virtgpu command from the guest
VM to get the physical p2pdma_distance of two PCI devices of guest VM.

Julia Zhang (3):
  virtio-gpu: set hostaddr for virtio iGPU
  pci: introduce a function to get PCIDevice
  virtio-gpu: add a new command to calculate p2pdma_distance

 hw/display/virtio-gpu-virgl.c               | 47 +++++++++++++++++++++
 hw/display/virtio-gpu.c                     |  6 +++
 hw/i386/xen/xen-hvm.c                       |  6 +++
 hw/pci/pci.c                                | 22 ++++++++++
 hw/xen/xen_pt.c                             | 10 ++---
 hw/xen/xen_pt.h                             |  1 -
 include/hw/pci/pci.h                        |  2 +
 include/hw/pci/pci_device.h                 |  1 +
 include/hw/virtio/virtio-gpu-bswap.h        | 12 ++++++
 include/hw/virtio/virtio-gpu.h              |  2 +
 include/hw/xen/xen.h                        |  3 ++
 include/standard-headers/linux/virtio_gpu.h | 19 +++++++++
 12 files changed, 125 insertions(+), 6 deletions(-)