Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2892112pxa; Tue, 18 Aug 2020 00:15:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRkmlizDXzqRrHgoPAIDMxMz30OgQetX6yzP63esdegVUoFplau+YUn8Ci9YhC7xm5bdPC X-Received: by 2002:a05:6402:17a1:: with SMTP id j1mr18132903edy.99.1597734931098; Tue, 18 Aug 2020 00:15:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597734931; cv=none; d=google.com; s=arc-20160816; b=G25I0j6rz52Buhx0ePn02VMlJL8rcl2eK9llerTa71kXO55ErGCrtke1riv68dR1Px ecIzHL8guV4xhY0rDfhplvI5vizAvfnktrJqEpQGvDTWtAasXPfbRRqHSj9wFjqWSGIV Idnynj3IKM+wMf88UeY5K8hXDE8AOUBeFPHsZH8XC33QIqvka/O0qi6UJQb6dn5q/2Yb Xlqh4uNglgJwyi3cmU8nfQIBgNqNbdxUOxLpoKV9ZEtzo2TBZENQlD6azPQBlJ7yhG3e CTN0KmyJtKT56qlIAKti1JmTtWFxRMkUmKcvA7AUARNPXFM7RAKFXrbFYamNqNtWbvbi fFBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=k/dwpDf9Rw0FIDL5Sc/gG8pBkCydPXuy0KjMx4jHUik=; b=pAGZauEDKF9aDCxCxZS2ao3O8dvyhLstiJMzJtg+ThBmMLJQYb3Lcu3P172E6mkX14 kMfWHlLemjdDxnohllGd1xzQBQE5rCC2kn7Q342f3kuBbEV8KR3X8V6gSpx2uMruUcLD KwuG8ZssrVsgdG8v0TY+vPpGi+W7EOfPUdyv3zIhnvvW3RBSBBBs8HkoCEfVJhNRrR66 EigwLwEJ8XD5MuqgEy59f1E7z33yzaBWdeSWeyOsGSm+bHdZBEYehWW5tLndZZ0SShuY CVNSydeSkP9iF20SW001npKzmUGDTqqctlRCxgb2Z3NnzZsTNf/eMgd1Ck8WmM4YbbOF sloA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TJk2wGpK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si13400157edj.540.2020.08.18.00.15.07; Tue, 18 Aug 2020 00:15:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TJk2wGpK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726599AbgHRHOF (ORCPT + 99 others); Tue, 18 Aug 2020 03:14:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726357AbgHRHOD (ORCPT ); Tue, 18 Aug 2020 03:14:03 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 118ABC061389 for ; Tue, 18 Aug 2020 00:14:03 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id kr4so9009610pjb.2 for ; Tue, 18 Aug 2020 00:14:03 -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=k/dwpDf9Rw0FIDL5Sc/gG8pBkCydPXuy0KjMx4jHUik=; b=TJk2wGpKp5lkOsiP0L6dKI7P/t5To6aQ2Cnq6wOHLJwRdvC9z3RH7BxTBUoTJK4cQl xAOVRhA+nDpU/AlSI5Rdc2kE1DxHG8z66cjJAKSW4uqXxM0sN6C44MOfw8xOn/f5qBp/ 2po8Q5uZ4E1NsdNEuN7aS0lHMaUw/TsrdN5fQ= 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/dwpDf9Rw0FIDL5Sc/gG8pBkCydPXuy0KjMx4jHUik=; b=kfa/XJTeZ7ibOJZEOObFNQfriQ22xjSftTqr5SZIWdonNPXenPTfWftRgZtceoADA8 vjC6sNIQ2hEeqFf2pZIVIS7XbltIuRUPWRF5wM2nOZq8aHqtjzfauGk8/Emn1lkc3AfA AC9JNOqqH6EBihyFx+IeVZtg3D7xoCi6DyXSkiiZzmVOU1hWESoZvL+Fdq6veKwTNXW3 oQ2PCLhudIjoZUFF6ac+N45meMvrqh5eXOKqYmA+eS3wK0C6d0RVDPziRCU6ZoK0SpVL zhHfcMqwlg6oHF/0ofqy9a1e0S56MGW1VQII9ev5RZYOyHCVb/H1DdBvBFlRn6XinqT5 tLBA== X-Gm-Message-State: AOAM533iAvHHLgSchA/Sfkrg2RT5cm+vaZhSRTR89vVga7wsLSdbWZ4P M8eMbUDT/tacHaOEz0mvhmpiAw== X-Received: by 2002:a17:902:9890:: with SMTP id s16mr14139705plp.332.1597734842657; Tue, 18 Aug 2020 00:14:02 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:f693:9fff:fef4:a930]) by smtp.gmail.com with ESMTPSA id w15sm22074294pjk.13.2020.08.18.00.13.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Aug 2020 00:14:02 -0700 (PDT) From: David Stevens To: Gerd Hoffmann Cc: David Airlie , Daniel Vetter , Sumit Semwal , "Michael S . Tsirkin" , Jason Wang , 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 Subject: [PATCH v7 2/3] virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature Date: Tue, 18 Aug 2020 16:13:42 +0900 Message-Id: <20200818071343.3461203-3-stevensd@chromium.org> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog In-Reply-To: <20200818071343.3461203-1-stevensd@chromium.org> References: <20200818071343.3461203-1-stevensd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_gpu.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 enum virtio_gpu_ctrl_type { VIRTIO_GPU_UNDEFINED = 0, @@ -66,6 +70,7 @@ enum virtio_gpu_ctrl_type { VIRTIO_GPU_CMD_GET_CAPSET_INFO, VIRTIO_GPU_CMD_GET_CAPSET, VIRTIO_GPU_CMD_GET_EDID, + VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID, /* 3d commands */ VIRTIO_GPU_CMD_CTX_CREATE = 0x0200, @@ -87,6 +92,7 @@ enum virtio_gpu_ctrl_type { VIRTIO_GPU_RESP_OK_CAPSET_INFO, VIRTIO_GPU_RESP_OK_CAPSET, VIRTIO_GPU_RESP_OK_EDID, + VIRTIO_GPU_RESP_OK_RESOURCE_UUID, /* error responses */ VIRTIO_GPU_RESP_ERR_UNSPEC = 0x1200, @@ -340,4 +346,17 @@ enum virtio_gpu_formats { VIRTIO_GPU_FORMAT_R8G8B8X8_UNORM = 134, }; +/* VIRTIO_GPU_CMD_RESOURCE_ASSIGN_UUID */ +struct virtio_gpu_resource_assign_uuid { + struct virtio_gpu_ctrl_hdr hdr; + __le32 resource_id; + __le32 padding; +}; + +/* VIRTIO_GPU_RESP_OK_RESOURCE_UUID */ +struct virtio_gpu_resp_resource_uuid { + struct virtio_gpu_ctrl_hdr hdr; + __u8 uuid[16]; +}; + #endif -- 2.28.0.220.ged08abb693-goog