Message ID | 20241207105023.542399-1-julia.zhang@amd.com (mailing list archive) |
---|---|
Headers | show |
Series | virtgpu: check if P2P is possiable or not | expand |
On 07.12.24 11:50, Julia Zhang wrote: > To implement dGPU prime feature, virtgpu needs to import/export buffer > between virtio iGPU and passthrough dGPU. Before that, virtgpu should > check if P2P is possible or not. But calling function pci_p2pdma_distance > in guest VM will only get virtual p2pdma_distance instead of real physical > 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. It is hard to review this series without having a clear picture how this all is coming together. I guess the virtgpu frontend will send a p2pdma_distance request to the backend, which is running in user mode of dom0. This backend will then call into the privcmd driver to obtain the needed information and sends it back to the frontend. Can you please confirm my suspicion is correct? Juergen
On 2024/12/12 15:43, Juergen Gross wrote: > On 07.12.24 11:50, Julia Zhang wrote: >> To implement dGPU prime feature, virtgpu needs to import/export buffer >> between virtio iGPU and passthrough dGPU. Before that, virtgpu should >> check if P2P is possible or not. But calling function >> pci_p2pdma_distance >> in guest VM will only get virtual p2pdma_distance instead of real >> physical >> 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. > > It is hard to review this series without having a clear picture how > this all is coming together. > > I guess the virtgpu frontend will send a p2pdma_distance request to > the backend, which is running in user mode of dom0. This backend will > then call into the privcmd driver to obtain the needed information and > sends it back to the frontend. > > Can you please confirm my suspicion is correct? Yes, you are right. Julia > > > Juergen