[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/3] virtgpu: check if P2P is possiable or not
- To: David Airlie <airlied@xxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>, Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx>, Chia-I Wu <olvaffe@xxxxxxxxx>, <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Julia Zhang <julia.zhang@xxxxxxx>
- Date: Sat, 7 Dec 2024 18:50:20 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=j3NJSEdVo5KlzEiay2XUDjqLBYgfkv1hWCm9vS9ugrs=; b=XQbXfEQnMn0L+hqWbQVA+i1IDB+h2VQrfxIbPokL/Q0lShXSJhAvuHgx5RYdEiGpuI94oBlxPKkLeRndjwbha9F/JogRHIKChNbZLKeNg1ZaPouD6kA81gWMADB45AIyuv9kyybfzhwHB1GPMmQWMZaAd3dIO5YmUUyPhGQQGw8DHCQI0hqfXIwNSQ20RTctnX5+eDnf0P9Rt3dSCqgCK4++hR1Wjfw5e5M6INdxd5t/HrsTjU+W1LpUo5b2BxVtBjtNlp5tZFDT4oVf61VX8F7A0xa3Zokhn908A+issxIxeEaKhlj2US4Vp0qOoeU+q9/n2R2kJNJSDyQb2upbPA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mZLARswOq4vxTYQ5L/ALSx77d9uZfmI6AbW6OR4Er8WLOArUXFO0hX5DU9facAqstLizPTHp5VwQcxdc13/sgoRr/O9ButblsETIM5FjoJmbIFS+v/v6MTF5GnVI2CA85rOvUizSpUjKDOP0ZelfOiyZ9SoOlCdCeVELJXTq8/VWfq6nKvdrgq8vCWdidkvPXNcwC9m6aHjmw1Ge0eNygotFl7ZpRCKkPd5W39bEBUPydqObQRkVk07vIbuvvGL93l56lVK2wOXym6zwh2DU6LcpzIB2AVjvVgr+ucWgzAebMCCByAEukGGUFHb/Hujuemb+Kjl9dddUHGrVmRT1ig==
- Cc: Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, Chen Jiqian <Jiqian.Chen@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Penny Zheng <penny.zheng@xxxxxxx>, Zhu Lingshan <Lingshan.Zhu@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>
- Delivery-date: Sat, 07 Dec 2024 10:51:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
Julia Zhang (3):
xen:get p2pdma_distance
virtgpu: get p2pdma_distance
drm/virtio: Implement device_attach
drivers/gpu/drm/virtio/virtgpu_drv.h | 17 ++++++++
drivers/gpu/drm/virtio/virtgpu_prime.c | 59 +++++++++++++++++++++++++-
drivers/gpu/drm/virtio/virtgpu_vq.c | 53 +++++++++++++++++++++++
drivers/xen/privcmd.c | 42 ++++++++++++++++++
include/uapi/linux/virtio_gpu.h | 19 +++++++++
include/uapi/xen/privcmd.h | 12 ++++++
6 files changed, 201 insertions(+), 1 deletion(-)
--
2.34.1
|