From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-dev-return-6918-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 9C106985FD9 for ; Wed, 11 Mar 2020 11:20:34 +0000 (UTC) From: David Stevens Date: Wed, 11 Mar 2020 20:20:03 +0900 Message-Id: <20200311112004.47138-4-stevensd@chromium.org> In-Reply-To: <20200311112004.47138-1-stevensd@chromium.org> References: <20200311112004.47138-1-stevensd@chromium.org> MIME-Version: 1.0 Subject: [virtio-dev] [PATCH v3 3/4] virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable To: Gerd Hoffmann , David Airlie Cc: Daniel Vetter , "Michael S . Tsirkin" , Jason Wang , Sumit Semwal , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Stevens , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, virtio-dev@lists.oasis-open.org List-ID: 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. Signed-off-by: David Stevens --- include/uapi/linux/virtio_gpu.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gp= u.h index 0c85914d9369..9721d58b4d58 100644 --- a/include/uapi/linux/virtio_gpu.h +++ b/include/uapi/linux/virtio_gpu.h @@ -50,6 +50,10 @@ * VIRTIO_GPU_CMD_GET_EDID */ #define VIRTIO_GPU_F_EDID 1 +/* + * VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID + */ +#define VIRTIO_GPU_F_RESOURCE_UUID 2 =20 enum virtio_gpu_ctrl_type { =09VIRTIO_GPU_UNDEFINED =3D 0, @@ -66,6 +70,7 @@ enum virtio_gpu_ctrl_type { =09VIRTIO_GPU_CMD_GET_CAPSET_INFO, =09VIRTIO_GPU_CMD_GET_CAPSET, =09VIRTIO_GPU_CMD_GET_EDID, +=09VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID, =20 =09/* 3d commands */ =09VIRTIO_GPU_CMD_CTX_CREATE =3D 0x0200, @@ -87,6 +92,7 @@ enum virtio_gpu_ctrl_type { =09VIRTIO_GPU_RESP_OK_CAPSET_INFO, =09VIRTIO_GPU_RESP_OK_CAPSET, =09VIRTIO_GPU_RESP_OK_EDID, +=09VIRTIO_GPU_RESP_OK_RESOURCE_UUID, =20 =09/* error responses */ =09VIRTIO_GPU_RESP_ERR_UNSPEC =3D 0x1200, @@ -340,4 +346,17 @@ enum virtio_gpu_formats { =09VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM =3D 134, }; =20 +/* VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID */ +struct virtio_gpu_resource_assign_uuid { +=09struct virtio_gpu_ctrl_hdr hdr; +=09__le32 resource_id; +=09__le32 padding; +}; + +/* VIRTIO_GPU_RESP_OK_RESOURCE_UUID */ +struct virtio_gpu_resp_resource_uuid { +=09struct virtio_gpu_ctrl_hdr hdr; +=09__u8 uuid[16]; +}; + #endif --=20 2.25.1.481.gfbce0eb801-goog --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org