Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2210504ybf; Mon, 2 Mar 2020 04:17:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyQnEEVH9MDd6yhJhIB2IIO0OPBg2JsuAE7UPescCk34faSWOEjCLdYyBlP2/QvrDPQKWBz X-Received: by 2002:a54:4006:: with SMTP id x6mr11388391oie.145.1583151449613; Mon, 02 Mar 2020 04:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583151449; cv=none; d=google.com; s=arc-20160816; b=YR2EBNC4vPcdbc1Xrlq/F8xA5AaYoA0IK0YI7j4Mj3uhfNXZ38FxIkyF588dH6OCgI AZmb+y0ivxO2tZmP0BEQLvoUlORy590Q2aAoOJnr0z3/auJQNEyK5Run0t1zyQxToVMB Vy+U05DiOk2lhVWBZTD9y3jh8IOmujIA9v8Crja3nogKtz2AJKc3rfAwhSkorUtcsTGP 4+6AHih+UeyengisAMTlzPd79lQbg4WW0v29u6AW/kbOHyzhdWQvG7Bi594xDttYlvS8 U8rSYpNDk7/4VCtva6VFFt+dH+v+UpUYm4CAJ48+WUi/WQzI7wDvllCH/WmvV10YsbFe nbQg== 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=0PjKVZqL/5Sq/Vlrjx4wKontU7cZeb+ck8gZ9rnWcpM=; b=xnVqZLOIyojnRazTL0IpSsRS7NSIbFWCI9Rh9NtAM69VoNzcsyR5aAipMvAyARdRZt ixA4XyGdbUKFEpn0rnAjYorHvK1Tc1YrTzO9NYCRFmsktrhwKGA/lmiR9f5aR4McsEsw 8MvrcNf7DwqDC8WxOv5Q93SJcOuTDKeiFRsTCj7fEhv6xzT/rtsBqedb+Y5iUb4P0jJL /CDo66bAPAosRvmRb90oq7600JEMprw9NKsUgOTiydFdfUonACnes9mZfdHldHw6NREy fvEf73PrBDSqNf/7MXW9a76k8ZFnQue120GxqgXMOZeloIXCcKaiwLDy6BWsUpypWgi2 CGIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kr+5lA7A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q64si3130341oic.155.2020.03.02.04.17.18; Mon, 02 Mar 2020 04:17:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kr+5lA7A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727901AbgCBMPw (ORCPT + 99 others); Mon, 2 Mar 2020 07:15:52 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33961 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727895AbgCBMPv (ORCPT ); Mon, 2 Mar 2020 07:15:51 -0500 Received: by mail-pg1-f194.google.com with SMTP id t3so5361495pgn.1 for ; Mon, 02 Mar 2020 04:15:49 -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=0PjKVZqL/5Sq/Vlrjx4wKontU7cZeb+ck8gZ9rnWcpM=; b=kr+5lA7AGDXNd+BvQnHGEUM/YIVpMyxfacyW7nSyKmfmJ396uP5V0PPdFEhY/J/GrT XnFMiPJIw/H18rdDZmI1srW8uWy9sb6BAkU12ExSK5qOTQUGo48VcuLz0dlmky47ozdw H2wdzbTsXbAseGijc2gPEB2RiJ3eoe/IqoUd4= 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=0PjKVZqL/5Sq/Vlrjx4wKontU7cZeb+ck8gZ9rnWcpM=; b=bfMy+ESMZ0Ok1nAQniDCwImWEwKYQLSTDAOoLZrTklFxL6y4yoqYcfLbnFWPp+cvRu SQeHcPuYsrGn+iHL6XUr4ZCcXgT4YJh8wKSOhdAMnWJQiVsdKAKE1rAdaXHzdT8Z7tZG f/z3Jh11XegHFGi1nqj6/VexVpZqES8Tw753rxWH2qZlZ+qrdprozo4eNQ0FPFWTQMFl pMtFNrsVYFHMDhX82gw+6q7sqLTHplkCe9OUDwXGhm4B6Ajc8czRa97t4Qo+zzHdDk5T L/Xc1IQ5qgVRWeDA8d3nboP5mTODyGKHa5MQ3eIbu7Cez38Jov/5qNjIAdQVB4MyZo0f DcXg== X-Gm-Message-State: ANhLgQ2jyG5iv7incYNhzZ8ybEDi4QHKR49WPZ4VvgMnpcOTajVmaKfQ N9Ucqa+rbIHNevn3CCystmpATA== X-Received: by 2002:a62:5c2:: with SMTP id 185mr7620057pff.175.1583151349151; Mon, 02 Mar 2020 04:15:49 -0800 (PST) Received: from localhost ([2401:fa00:8f:203:30f2:7a9c:387e:6c7]) by smtp.gmail.com with ESMTPSA id y5sm20788008pfr.169.2020.03.02.04.15.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Mar 2020 04:15:48 -0800 (PST) From: David Stevens 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 Subject: [PATCH v2 3/4] virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature Date: Mon, 2 Mar 2020 21:15:23 +0900 Message-Id: <20200302121524.7543-4-stevensd@chromium.org> X-Mailer: git-send-email 2.25.0.265.gbab2e86ba0-goog In-Reply-To: <20200302121524.7543-1-stevensd@chromium.org> References: <20200302121524.7543-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.25.0.265.gbab2e86ba0-goog