History

virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature

This feature allows the guest to request a UUID from the host for a particular virtio_gpu resource. The UUID can then be shared with other virtio devices, to allow the other host devices to access the virtio_gpu's corresponding host resource.

David Stevens committed 6 years ago

Commit 592d9fb1 parent a0308931 file · +19 −0Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/virtio_gpu.h+19−0
@@ -50,6 +50,10 @@ · 49 unmodified lines
5050 * VIRTIO_GPU_CMD_GET_EDID
5151 */
5252 #define VIRTIO_GPU_F_EDID 1
53+/*
54+ * VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID
55+ */
56+#define VIRTIO_GPU_F_RESOURCE_UUID 2
5357
5458 enum virtio_gpu_ctrl_type {
5559 VIRTIO_GPU_UNDEFINED = 0,
@@ -66,6 +70,7 @@ enum virtio_gpu_ctrl_type { · 10 unmodified lines
6670 VIRTIO_GPU_CMD_GET_CAPSET_INFO,
6771 VIRTIO_GPU_CMD_GET_CAPSET,
6872 VIRTIO_GPU_CMD_GET_EDID,
73+ VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID,
6974
7075 /* 3d commands */
7176 VIRTIO_GPU_CMD_CTX_CREATE = 0x0200,
@@ -87,6 +92,7 @@ enum virtio_gpu_ctrl_type { · 15 unmodified lines
8792 VIRTIO_GPU_RESP_OK_CAPSET_INFO,
8893 VIRTIO_GPU_RESP_OK_CAPSET,
8994 VIRTIO_GPU_RESP_OK_EDID,
95+ VIRTIO_GPU_RESP_OK_RESOURCE_UUID,
9096
9197 /* error responses */
9298 VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200,
@@ -340,4 +346,17 @@ enum virtio_gpu_formats { · 247 unmodified lines
340346 VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM = 134,
341347 };
342348
349+/* VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID */
350+struct virtio_gpu_resource_assign_uuid {
351+ struct virtio_gpu_ctrl_hdr hdr;
352+ __le32 resource_id;
353+ __le32 padding;
354+};
355+
356+/* VIRTIO_GPU_RESP_OK_RESOURCE_UUID */
357+struct virtio_gpu_resp_resource_uuid {
358+ struct virtio_gpu_ctrl_hdr hdr;
359+ __u8 uuid[16];
360+};
361+
343362 #endif