From nobody Tue May 21 20:04:00 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1584584377; cv=none; d=zohomail.com; s=zohoarc; b=j1sjwr20Srp1vT9ECSpyCi22Jfw1UU0XVO1TrRNAowp9zsqITKOuS1EWDDefnJ4fECdUKf95nLe1suCgwH9YYokameyYGHRhkyYNV+MsusAWfmNRrHbRCrxb3XDsxIrAf7xh65GORRdnQLef+EITX4T46c3Db6mQxTxoFyJymXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584584377; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1C8jLhXuPfBb7h90RHOdI3Yy2sESPpspTtCUaNxuRxE=; b=kjGa9aD/1+U5NN/hOazej4dtQG6rDPMFJEZWnTbeooK3uaBXFtrJf8z6qk9sCj/lK/4YIJWa1RSwN8XalkNezvNvfauW4jVvdQU2M3AYr8JQQsVsC4bNIohtB5d+/EmAlaX8+iwBaNOBS6d4OCiooA9uWNx+wNDmlik/LrnKcak= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584584377830943.6226718984318; Wed, 18 Mar 2020 19:19:37 -0700 (PDT) Received: from localhost ([::1]:60700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEkmW-0008OO-Jj for importer@patchew.org; Wed, 18 Mar 2020 22:19:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44082) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEkld-00073M-N3 for qemu-devel@nongnu.org; Wed, 18 Mar 2020 22:18:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEklc-0000DA-7b for qemu-devel@nongnu.org; Wed, 18 Mar 2020 22:18:41 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:33340) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEklc-00006Q-1R for qemu-devel@nongnu.org; Wed, 18 Mar 2020 22:18:40 -0400 Received: by mail-pg1-x542.google.com with SMTP id m5so355687pgg.0 for ; Wed, 18 Mar 2020 19:18:39 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:30f2:7a9c:387e:6c7]) by smtp.gmail.com with ESMTPSA id m18sm327988pgd.39.2020.03.18.19.18.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Mar 2020 19:18:38 -0700 (PDT) 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=1C8jLhXuPfBb7h90RHOdI3Yy2sESPpspTtCUaNxuRxE=; b=ab9aZhwV8Ief16HW0MRvphHu2sqdH+8TGCXu2J/DZM2sTVAcH82y5neSsPEP+v4s/g kKOhY1f8E1gjgR7A75Y5DkfTT00HG+m9S9p44G5AO7UyphRi0nUwZXnpRcJ4/qBxtqM/ gXiqeeT6GPF6I/JHU0G2kMo9Xp3OFyMnF8MB0= 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=1C8jLhXuPfBb7h90RHOdI3Yy2sESPpspTtCUaNxuRxE=; b=YNCOgi1HnPErZW/vbltWnVg5FglIrctdkEtlQWpscqZZpVNj1QQZjQaHj5epnUYe60 LIzl9bcZtrg/UIuPE7nxowSezrkrIkfWvAwM2rX/udrsmcVCykz+20V0pRWj4ZJMB8Nm qWXacZcyoS92MlhUk1Ny/0YoxIBVHFqaUeGaVeoc2G7zGRXxpfHlqYjI33NT/5vCrNKY H6HT40LUbZ1THDuVCcTbBvraIT7/rW7SqKQnxXW6Dik7ImWZly7Lex4aUiVVLWdYEbMo 6SU/8yQtJiN1PKqWLYV84JLoWN1YTqRYGL5VHF5MeMydWSXltvVE0BZoE29gSmJokyle Kh4w== X-Gm-Message-State: ANhLgQ3d8sRddf7v4HFI3AoS4Kja3zX0ousNUSh++u0c8UXY2Va3C1O+ rj2hR5nC4LxpNwq8szYPXdl09g== X-Google-Smtp-Source: ADFU+vsA3Do93d+fKRKpI4+KnCX1CyGpYNhUlFZFW824PU6sMlngpOx8GyHpGZj6qH3Whemhlg7jTw== X-Received: by 2002:aa7:870f:: with SMTP id b15mr1443454pfo.190.1584584318862; Wed, 18 Mar 2020 19:18:38 -0700 (PDT) From: David Stevens To: virtio-comment@lists.oasis-open.org Subject: [PATCH v4 1/2] content: define what an exported object is Date: Thu, 19 Mar 2020 11:18:22 +0900 Message-Id: <20200319021823.57219-2-stevensd@chromium.org> X-Mailer: git-send-email 2.25.1.481.gfbce0eb801-goog In-Reply-To: <20200319021823.57219-1-stevensd@chromium.org> References: <20200319021823.57219-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::542 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" Define a mechanism for sharing objects between different virtio devices. Signed-off-by: David Stevens --- content.tex | 12 ++++++++++++ introduction.tex | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/content.tex b/content.tex index b1ea9b9..c8a367b 100644 --- a/content.tex +++ b/content.tex @@ -373,6 +373,18 @@ \section{Driver Notifications} \label{sec:Virtqueues /= Driver notifications} =20 \input{shared-mem.tex} =20 +\section{Exporting Objects}\label{sec:Basic Facilities of a Virtio Device = / Exporting Objects} + +When an object created by one virtio device needs to be +shared with a seperate virtio device, the first device can +export the object by generating a UUID which can then +be passed to the second device to identify the object. + +What constitutes an object, how to export objects, and +how to import objects are defined by the individual device +types. It is RECOMMENDED that devices generate version 4 +UUIDs as specified by \hyperref[intro:rfc4122]{[RFC4122]}. + \chapter{General Initialization And Device Operation}\label{sec:General In= itialization And Device Operation} =20 We start with an overview of device initialization, then expand on the diff --git a/introduction.tex b/introduction.tex index 40f16f8..fc2aa50 100644 --- a/introduction.tex +++ b/introduction.tex @@ -40,6 +40,10 @@ \section{Normative References}\label{sec:Normative Refer= ences} \phantomsection\label{intro:rfc2119}\textbf{[RFC2119]} & Bradner S., ``Key words for use in RFCs to Indicate Requirement Levels'', BCP 14, RFC 2119, March 1997. \newline\url{http://www.ietf.org/r= fc/rfc2119.txt}\\ + \phantomsection\label{intro:rfc4122}\textbf{[RFC4122]} & +Leach, P., Mealling, M., and R. Salz, ``A Universally Unique +IDentifier (UUID) URN Namespace'', RFC 4122, DOI 10.17487/RFC4122, +July 2005. \newline\url{http://www.ietf.org/rfc/rfc4122.txt}\\ \phantomsection\label{intro:S390 PoP}\textbf{[S390 PoP]} & z/Architecture= Principles of Operation, IBM Publication SA22-7832, \newline\url{http://pu= blibfi.boulder.ibm.com/epubs/pdf/dz9zr009.pdf}, and any future revisions\\ \phantomsection\label{intro:S390 Common I/O}\textbf{[S390 Common I/O]} & = ESA/390 Common I/O-Device and Self-Description, IBM Publication SA22-7204, = \newline\url{http://publibfp.dhe.ibm.com/cgi-bin/bookmgr/BOOKS/dz9ar501/CCO= NTENTS}, and any future revisions\\ \phantomsection\label{intro:PCI}\textbf{[PCI]} & --=20 2.25.1.481.gfbce0eb801-goog From nobody Tue May 21 20:04:00 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1584584382; cv=none; d=zohomail.com; s=zohoarc; b=DC4Uj2iVZlNdAdpjnuRLJ/sRT3ZwqPRF+lyYm0M0CY1QxbXVrVt0hoHkiSyGzhmmdaCF8oOnuV8nsie2gw97LfCtuUsIO7Fd7o2GVyQT4WB3io8A+1fXMhJmZGpBu9UgK3wPYIEaIVGlcco06pRTdMtFpS9zd4wwpUM1IVPyWXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584584382; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N1Zou9g3kOpovEPiLX1RjUrhPNeCP8eY2KNWCUQTCG4=; b=XsFaCb4223mjpQSdOMsWHPQ9FMj5kdGu73FOY2RaGMKrGhp7z4vdu2AM9ycxh01mfNEv25BuP5grcFlKHHqBXMyTJrhSJYk3f0LClT6o7b9G4aX+6kKYamwm0Mdxc/tCUzHnqwcIP4yWJ2cqtZet/X1HYT/23ck3F6/pYVYPPdQ= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1584584382765377.87780764323827; Wed, 18 Mar 2020 19:19:42 -0700 (PDT) Received: from localhost ([::1]:60702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEkmb-00007w-IU for importer@patchew.org; Wed, 18 Mar 2020 22:19:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44131) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEkli-0007By-SL for qemu-devel@nongnu.org; Wed, 18 Mar 2020 22:18:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEklh-0000m0-Jh for qemu-devel@nongnu.org; Wed, 18 Mar 2020 22:18:46 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:37539) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEklh-0000fN-Bm for qemu-devel@nongnu.org; Wed, 18 Mar 2020 22:18:45 -0400 Received: by mail-pj1-x102c.google.com with SMTP id ca13so287897pjb.2 for ; Wed, 18 Mar 2020 19:18:45 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:30f2:7a9c:387e:6c7]) by smtp.gmail.com with ESMTPSA id q9sm325194pgs.89.2020.03.18.19.18.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Mar 2020 19:18:44 -0700 (PDT) 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=N1Zou9g3kOpovEPiLX1RjUrhPNeCP8eY2KNWCUQTCG4=; b=aAYKaD5hXQz4nJWmWdoEb5Skgi/qTb9l9vp+6LzCAZRNfaJe8kilk2IdLVZHFqQvsX xEMJNJezpcGfyHocz8a64j12ZNDFBnZRXEv41Hg4aXctgy4Jdk0vZ+46q+ygPv/g+AI7 qcwpL4XBMW33MXM12kYQuh/1TgiT3ewv/29d0= 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=N1Zou9g3kOpovEPiLX1RjUrhPNeCP8eY2KNWCUQTCG4=; b=TqKG1YGxAwkb0qy0pWu+nmqPLB9qdXjdnuA4K3pynFnRuY/WLImdgctcPs/GH0s/zR TQmOqKxqNsrThFnzcYBuWJw+62BrEz0W3JXquSg9INHe4hRzHZAtCvX3x/6a76PSusia Rl/q/i6AGDw22dGkwhrSqJ+o2HCHBzUyUSGSf2IsFsMTWB9Fyk+gXtlrlVWuopTB5gbP zl54PAP1vZtaQ7yohCVrD5dhNPK/nUev2Kk8ZdUkC6GlYn0IfDzI47N0XnKoLGG48rx9 PVfLDZr7duk6yA6bL4ONUZpcZKqUpgCzXOUkWGAx6VJSCCOXqYnDtMuCa2d+bppGP7aR DF6A== X-Gm-Message-State: ANhLgQ2TA92a+PloTwyZbao0qOasn4GFBdu1mR7Z6ocuZxrB9m0iquPw 9z1NoYaDkyYLLIdgW43NlB7Fng== X-Google-Smtp-Source: ADFU+vtE7S8SgklW7D0s/jGCM8v62Wug2+KP+L5Qt3hs5eR8MSAtHC0RMzYyuHEp+K2oo2rbMWIgNQ== X-Received: by 2002:a17:90a:7105:: with SMTP id h5mr1329758pjk.54.1584584324391; Wed, 18 Mar 2020 19:18:44 -0700 (PDT) From: David Stevens To: virtio-comment@lists.oasis-open.org Subject: [PATCH v4 2/2] virtio-gpu: add the ability to export resources Date: Thu, 19 Mar 2020 11:18:23 +0900 Message-Id: <20200319021823.57219-3-stevensd@chromium.org> X-Mailer: git-send-email 2.25.1.481.gfbce0eb801-goog In-Reply-To: <20200319021823.57219-1-stevensd@chromium.org> References: <20200319021823.57219-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::102c 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 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/virtio-gpu.tex b/virtio-gpu.tex index af4ca61..e75aafa 100644 --- a/virtio-gpu.tex +++ b/virtio-gpu.tex @@ -35,6 +35,8 @@ \subsection{Feature bits}\label{sec:Device Types / GPU De= vice / Feature bits} \begin{description} \item[VIRTIO_GPU_F_VIRGL (0)] virgl 3D mode is supported. \item[VIRTIO_GPU_F_EDID (1)] EDID is supported. +\item[VIRTIO_GPU_F_RESOURCE_UUID (2)] assigning resources UUIDs for export + to other virtio devices is supported. \end{description} =20 \subsection{Device configuration layout}\label{sec:Device Types / GPU Devi= ce / Device configuration layout} @@ -181,6 +183,7 @@ \subsubsection{Device Operation: Request header}\label{= sec:Device Types / GPU De VIRTIO_GPU_CMD_GET_CAPSET_INFO, VIRTIO_GPU_CMD_GET_CAPSET, VIRTIO_GPU_CMD_GET_EDID, + VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID, =20 /* cursor commands */ VIRTIO_GPU_CMD_UPDATE_CURSOR =3D 0x0300, @@ -192,6 +195,7 @@ \subsubsection{Device Operation: Request header}\label{= sec:Device Types / GPU De VIRTIO_GPU_RESP_OK_CAPSET_INFO, VIRTIO_GPU_RESP_OK_CAPSET, VIRTIO_GPU_RESP_OK_EDID, + VIRTIO_GPU_RESP_OK_RESOURCE_UUID, =20 /* error responses */ VIRTIO_GPU_RESP_ERR_UNSPEC =3D 0x1200, @@ -454,6 +458,32 @@ \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_UUID, response data is \field{struct + virtio_gpu_resp_resource_uuid}. Support is optional and negotiated + using the VIRTIO_GPU_F_RESOURCE_UUID feature flag. + +\begin{lstlisting} +struct virtio_gpu_resource_assign_uuid { + struct virtio_gpu_ctrl_hdr hdr; + le32 resource_id; + le32 padding; +}; + +struct virtio_gpu_resp_resource_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.1.481.gfbce0eb801-goog