From nobody Thu Nov 13 16:16:44 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=chromium.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581061314482936.2589100693174; Thu, 6 Feb 2020 23:41:54 -0800 (PST) Received: from localhost ([::1]:51290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izyGv-0001Qf-E1 for importer@patchew.org; Fri, 07 Feb 2020 02:41:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37312) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izyG3-00006I-OH for qemu-devel@nongnu.org; Fri, 07 Feb 2020 02:41:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izyG2-0007Ny-KM for qemu-devel@nongnu.org; Fri, 07 Feb 2020 02:40:59 -0500 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:36156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1izyG2-0007K6-EK for qemu-devel@nongnu.org; Fri, 07 Feb 2020 02:40:58 -0500 Received: by mail-pj1-x1042.google.com with SMTP id gv17so566020pjb.1 for ; Thu, 06 Feb 2020 23:40:58 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:1f16:51f4:8631:68b2]) by smtp.gmail.com with ESMTPSA id dw10sm1482749pjb.11.2020.02.06.23.40.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Feb 2020 23:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K+lFsZ3D7frtdDjFKWe1aGa1gg1H8Ao5Is0znK6p0IQ=; b=B2H2rs1re6i1nnY3F52J+pN3K0qSaFUTXsvR/kHlXEC5q+GAsTwamOojZKavCOw06J 04YDv8/X7jlq0QULXSIqHNVvk6xXg36c/FTbd9jONol/F0ACmVj6f4tkeKEHk4K1ZkIG u5j152fRtHwRIWFWySh1j5lmLHd7OmXZ2TQpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K+lFsZ3D7frtdDjFKWe1aGa1gg1H8Ao5Is0znK6p0IQ=; b=pbgkTg6HbUgqLiGTpUVDFd3Nbzfe2K6v+4ybWkDWSj8xxn+65C3XATXi/Kw1yYuUjm 1ZTG4Xj9suNK2N/F4Wq/gaORxtFwp3W5iuhszEWjxfxs61cghkJ11LYYRsVcyH2tFBhw 73iWfdKvovdiMNgMEjEGctUdW5D8EvRmgQjzGe7VN7nByXrvUk6ErpGnCPiC1iMfHiHx Q8G45A01PVoR1J4OQsgnbKtXEbajmbyFIpfmufjev78WAgXd5iuT865B04zyhwYJJZFy U903mhff98pft7bpD83dttV4cm8w3f8X/nEIrzzPlKMmZZFM6qFYXZ+0BeEMPhF3CVLN x/OA== X-Gm-Message-State: APjAAAU+3Sm/3h1HMi1GYqhU5ujPIclQZD4HcY56xbgLqfYOrCIgglDa zsNaYI8SvYsvCgME5LWqiW24QA== X-Google-Smtp-Source: APXvYqwUsuQh7DqVB3QPoHA+aQLMvwcNFHiiFLQVrPJb+M5Yxl0A/kd6Svz1dKsbIQlkD43XLUSFhQ== X-Received: by 2002:a17:90a:a385:: with SMTP id x5mr2366982pjp.102.1581061257481; Thu, 06 Feb 2020 23:40:57 -0800 (PST) From: David Stevens To: virtio-comment@lists.oasis-open.org Subject: [RFC PATCH v3 2/2] virtio-gpu: add the ability to export resources Date: Fri, 7 Feb 2020 16:40:33 +0900 Message-Id: <20200207074033.172289-3-stevensd@chromium.org> X-Mailer: git-send-email 2.25.0.341.g760bfbb309-goog In-Reply-To: <20200207074033.172289-1-stevensd@chromium.org> References: <20200207074033.172289-1-stevensd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1042 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zach Reizner , Alexandre Courbot , qemu-devel , Stefan Hajnoczi , Alex Lau , Tomasz Figa , Keiichi Watanabe , David Stevens , Gerd Hoffmann , =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Dylan Reid , Gurchetan Singh , Pawel Osciak , Linux Media Mailing List Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Signed-off-by: David Stevens --- virtio-gpu.tex | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/virtio-gpu.tex b/virtio-gpu.tex index af4ca61..e950ad3 100644 --- a/virtio-gpu.tex +++ b/virtio-gpu.tex @@ -186,12 +186,16 @@ \subsubsection{Device Operation: Request header}\labe= l{sec:Device Types / GPU De VIRTIO_GPU_CMD_UPDATE_CURSOR =3D 0x0300, VIRTIO_GPU_CMD_MOVE_CURSOR, =20 + /* misc commands */ + VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID =3D 0x0400, + /* success responses */ VIRTIO_GPU_RESP_OK_NODATA =3D 0x1100, VIRTIO_GPU_RESP_OK_DISPLAY_INFO, VIRTIO_GPU_RESP_OK_CAPSET_INFO, VIRTIO_GPU_RESP_OK_CAPSET, VIRTIO_GPU_RESP_OK_EDID, + VIRTIO_GPU_RESP_OK_RESOURCE_ASSIGN_UUID, =20 /* error responses */ VIRTIO_GPU_RESP_ERR_UNSPEC =3D 0x1200, @@ -454,6 +458,31 @@ \subsubsection{Device Operation: controlq}\label{sec:D= evice Types / GPU Device / This detaches any backing pages from a resource, to be used in case of guest swapping or object destruction. =20 +\item[VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID] Creates an exported object from + a resource. Request data is \field{struct + virtio_gpu_resource_assign_uuid}. Response type is + VIRTIO_GPU_RESP_OK_RESOURCE_ASSIGN_UUID, response data is \field{struct + virtio_gpu_resp_resource_assign_uuid}. + +\begin{lstlisting} +struct virtio_gpu_resource_assign_uuid { + struct virtio_gpu_ctrl_hdr hdr; + le32 resource_id; + le32 padding; +}; + +struct virtio_gpu_resp_resource_assign_uuid { + struct virtio_gpu_ctrl_hdr hdr; + u8 uuid[16]; +}; +\end{lstlisting} + +The response contains a UUID which identifies the exported object created = from +the host private resource. Note that if the resource has an attached backi= ng, +modifications made to the host private resource through the exported objec= t by +other devices are not visible in the attached backing until they are trans= ferred +into the backing. + \end{description} =20 \subsubsection{Device Operation: cursorq}\label{sec:Device Types / GPU Dev= ice / Device Operation / Device Operation: cursorq} --=20 2.25.0.341.g760bfbb309-goog