[PATCH 2/3] pci: introduce a function to get PCIDevice

2024-12-07 Thread Julia Zhang
Introduce a helper function to get PCIDevice from qdev pci notation. Signed-off-by: Julia Zhang --- hw/pci/pci.c | 22 ++ include/hw/pci/pci.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 1416ae202c..95806ead4f 100644

[PATCH] xen: add privcmd ioctl to get p2pdma_distance

2024-12-07 Thread Julia Zhang
To implement dGPU prime feature, virtgpu driver need to get p2pdma_distance of two GPU from host side. This adds a new privcmd ioctl to get the real p2pdma_distance of two pci devices in the host with pci notations sent from guest side. Signed-off-by: Julia Zhang --- tools/include/xen-sys

[PATCH 3/3] virtio-gpu: add a new command to get p2pdma_distance

2024-12-07 Thread Julia Zhang
To implement passthrough dGPU prime in guest, virtio-gpu need to check p2pdma_distance of two GPUs. This adds a new command for guest to pass virtual pci notations of two pci devices to host and send xen privcmd to calculate physical p2pdma_distance. Signed-off-by: Julia Zhang --- hw/display

[PATCH 1/3] virtio-gpu: set hostaddr for virtio iGPU

2024-12-07 Thread Julia Zhang
Get physical pci notation from hvm file and set hostaddr for virtio iGPU. Signed-off-by: Julia Zhang --- hw/display/virtio-gpu.c| 6 ++ hw/xen/xen_pt.c| 10 +- hw/xen/xen_pt.h| 1 - include/hw/pci/pci_device.h| 1 + include/hw/virtio

[PATCH 0/3] Support getting p2pdma_distance

2024-12-07 Thread Julia Zhang
. 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

[PATCH 3/3] drm/virtio: Implement device_attach

2024-12-07 Thread Julia Zhang
er before calling drm_gem_map_attach(). Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_prime.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_prime.c index 4960620eba02..4f6bce79e1

[PATCH 2/3] virtgpu: get p2pdma_distance

2024-12-07 Thread Julia Zhang
pci devices from guest to host. Host will handle ioctl to calculate p2pdma_distance for this two pci devices on the host with pci notations sent from guest virtgpu driver. Signed-off-by: Julia Zhang --- drivers/gpu/drm/virtio/virtgpu_drv.h | 17 + drivers/gpu/drm/virtio/virtgpu_prime.c

[PATCH 1/3] xen:get p2pdma_distance

2024-12-07 Thread Julia Zhang
To get the p2pdma_distance, this create a new privcmd ioctl to calculate p2pdma_distance for two pci devices on the host with pci notations sent from guest virtgpu driver. Signed-off-by: Julia Zhang --- drivers/xen/privcmd.c | 42 ++ include/uapi/xen

[PATCH 0/3] virtgpu: check if P2P is possiable or not

2024-12-07 Thread Julia Zhang
p2pdma_distance. So this series introduce an implementation of virtgpu device_attach callback to get p2pdma_distance. And also adds a new virtgpu command to pass PCI notations from guest to host and a new xen privcmd to get physical p2pdma_distance according to the PCI notations in host. Julia Zhang (3

[PATCH v2 1/1] virgl: Implement resource_query_layout

2023-12-21 Thread Julia Zhang
From: Daniel Stone A new ioctl to shuttle information between host and guest about the actual buffer allocation, which can be used for interop between GL and Vulkan when supporting standard window systems. Signed-off-by: Daniel Stone Co-developed-by: Julia Zhang Signed-off-by: Julia Zhang

[PATCH v2 0/1] Implementation of resource_query_layout

2023-12-21 Thread Julia Zhang
Hi all, Sorry to late reply. This is v2 of the implementation of resource_query_layout. This adds a new ioctl to let guest query information of host resource, which is originally from Daniel Stone. We add some changes to support query the correct stride of host resource before it's created, which

[PATCH 2/2] virgl: Modify resource_query_layout

2023-11-09 Thread Julia Zhang
Modify resource_query_layout to handle the use case that need to query correct stride for guest linear resource before it is created. Signed-off-by: Julia Zhang --- hw/display/virtio-gpu-virgl.c | 20 +++- include/standard-headers/linux/virtio_gpu.h | 8

[PATCH 0/2] Implementation of resource_query_layout

2023-11-09 Thread Julia Zhang
/-/merge_requests/23896 virglrenderer mr: https: //gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1268 Daniel Stone (1): virgl: Implement resource_query_layout Julia Zhang (1): virgl: Modify resource_query_layout hw/display/virtio-gpu-base.c| 4 +++ hw/display/virtio-gpu

[PATCH 1/2] virgl: Implement resource_query_layout

2023-11-09 Thread Julia Zhang
From: Daniel Stone A new ioctl to shuttle information between host and guest about the actual buffer allocation, which can be used for interop between GL and Vulkan when supporting standard window systems. --- hw/display/virtio-gpu-base.c| 4 ++ hw/display/virtio-gpu-virgl.c