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

Juergen Gross jgross at suse.com
Thu Dec 12 07:43:30 UTC 2024


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xB0DE9DD628BF132F.asc
Type: application/pgp-keys
Size: 3683 bytes
Desc: OpenPGP public key
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20241212/b32b0c49/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20241212/b32b0c49/attachment-0001.sig>


More information about the dri-devel mailing list