Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp129539ybg; Mon, 8 Jun 2020 18:28:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjkXPLaN9q+pbt1ndMfsfi0AkbIHd1jnFWz8VvbsYgNaMTZrvsjQ75AHOvzpq7jIeiS0Jk X-Received: by 2002:aa7:c3d7:: with SMTP id l23mr4350136edr.264.1591666110086; Mon, 08 Jun 2020 18:28:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591666110; cv=none; d=google.com; s=arc-20160816; b=T1xg3bvzifZBd1Evc+ONn+iaut6+xtApcQduGhFG3JOZigPrq5mvIOsm1gSyv0gS03 SAn+gvJIEiSZVxeSOpOqAUB3SDAKAU8oEtcYMZdrwOgRb1OHw+tjbr5ryLTatJHZ1HVn fkkfupPEoj3h341UUm9FfINKNXreh/tjbaPa1EbK0kvckk1g/9wrQAOVtKteTx4lCJ+M xGfhO2mVa693+MFOHlYIvpN+mh/AvXiTmgEu1nIzEwhODJx7uJQesc50fx4T6xivI/00 N6wiKqReEMwhzeWw9m1DdJxi+7oOzNBwofLoj2swL7CGoU6NGG+UduNSMybeJYXyYNO9 zz9g== 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=0JcU5U23cBSwvRc+LtHthzK2bgv5UkiuTgYVD/tH+hs=; b=k1brAxolKlzYlf4/wMeSLq9w5oDCeeb3mzIGe0e5jo1/VZqPfoTfbs3k/RkZGK3uvL li3VaCx5S/Xd7rMPfaTHS6MzDb8XBPvg3pRc+5I553ACcOyN2eO7vuF8H30eO1i7ku6o o5vteJIo0Fd9uo8fJsj5Os2kb+JZV3IkTb0F8eis1O18qqFJYetVhEfjbqlDDQncdPB6 ODb2QB9AtNyq62jDCr2koTbDbDM5m3G48QrzTbwTVa9mH11FhXxqmkDU432tdvd2N5cE V0jtzdRPm78QZlhJZJ+2fI++TlR4rvzzHed0cAfOd3rNCSOG+eMrKy+MzqDE5SzqJzn2 hySg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Cclz/uvT"; 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 f6si9855672eds.91.2020.06.08.18.28.07; Mon, 08 Jun 2020 18:28:30 -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="Cclz/uvT"; 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 S1727945AbgFIB0I (ORCPT + 99 others); Mon, 8 Jun 2020 21:26:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727769AbgFIB0G (ORCPT ); Mon, 8 Jun 2020 21:26:06 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79A06C03E969 for ; Mon, 8 Jun 2020 18:26:05 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id s10so9609621pgm.0 for ; Mon, 08 Jun 2020 18:26:05 -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=0JcU5U23cBSwvRc+LtHthzK2bgv5UkiuTgYVD/tH+hs=; b=Cclz/uvTZow4B0U1qRKpIfedIS/qqqFD/W97f4FWTTgUSIgv5MGyWTfjOvzKfgeLOS XucPlkUB5NvC6iuas7lwY8RoBFAaZwTSekkX5ONXimlVNrv/IdRe4I+ZIXYigrvhnBa1 4eV20PnF8eKBbiOw07YVzba/YTQJnkyoClYnk= 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=0JcU5U23cBSwvRc+LtHthzK2bgv5UkiuTgYVD/tH+hs=; b=fD9Eis4VBx6koF5H7Z2gZh0jgzOjzquB+26V8tpYf990PVwIHiyLx6OCTaQjqJEjkV 5tz/Pri+/nBjxs9TDAX6hqjr/J7XXJ8uiSx/jzNmXG7uC6cwOi6S0H+k/uBYJOZc3QDi VGH58RpWZs2tvg3Jiy7tN71QEm+yjuS5UmW345HPaRfNAaudPliE7JqKi5xeZOfOcPKf vSDIZky5OFBfZLNDW0ecmxU8ZOkPMHKT6DGAXdK9gyRjaLO/JzPDwY6hgBLbi+dcgoKI telAdX1aMIYAbe//BOJYioWpe33RxquTbZMOx6iLGuthamyByB4KGt2PaML6VjvR47/2 AMMQ== X-Gm-Message-State: AOAM531TeWb1QDwnlgVMTmlmScfLaQHDA1TLGRYpiyqI0f3Ji/Q5ZeOx G64bbIJoVgfmAJ0AAzI6ZQm6fA== X-Received: by 2002:a62:2ccb:: with SMTP id s194mr17897487pfs.127.1591665965055; Mon, 08 Jun 2020 18:26:05 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:30f2:7a9c:387e:6c7]) by smtp.gmail.com with ESMTPSA id w65sm8051336pfb.160.2020.06.08.18.26.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2020 18:26:04 -0700 (PDT) From: David Stevens To: Gerd Hoffmann , David Airlie , Daniel Vetter , Sumit Semwal , "Michael S . Tsirkin" Cc: 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 v5 2/3] virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature Date: Tue, 9 Jun 2020 10:25:17 +0900 Message-Id: <20200609012518.198908-3-stevensd@chromium.org> X-Mailer: git-send-email 2.27.0.278.ge193c7cf3a9-goog In-Reply-To: <20200609012518.198908-1-stevensd@chromium.org> References: <20200609012518.198908-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.27.0.278.ge193c7cf3a9-goog