Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2747369pxa; Mon, 17 Aug 2020 18:39:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGOsS5EO9dKEkbVqJCVV78apAFGxrbyszFgzrqdBR4FmxUJKGfO9847RUmMOqnOoutDBN3 X-Received: by 2002:a05:6402:30a5:: with SMTP id df5mr17277316edb.18.1597714762786; Mon, 17 Aug 2020 18:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597714762; cv=none; d=google.com; s=arc-20160816; b=ul/gLJY75wLCto7ysqIzXr0iZiQHtKiT3zwPKfDruTl2E4jiTvO9He9QRaeqjGsjD4 2CP1kiD93Zk8agAGJayI1e6bQKREnZRk7CEDPe3wkFKliZH+i/nXtDpM3rqcYV5DTY3V bETinNDohEEHgpYPG3ho7rCYUpiWtir4IICHX2loxxt1MMJyX1LcNfagD4iJ1p28e87w MWogyfXzsdjF/F1LPcIcBd053r/gmvaMQ3zcDyW7qgiWKJTqMlvFcv+Bxh05SqHhDVkH tTBdgqe/JDhgXzQDsCq7U9+wEtiMhWeRD1g4uOlM3/aMZmBLLSEkRTuK2w1YR7SLsPip VKrg== 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=Wre48BZHWrWZ67xyZ5AEyS1/tyAVAVo0b9JqW2ykwh0CFnFXAMe+ybC49AMB9IcFRa n2j1K8QjfgeQh6pOgBf+DRpnM8e/6JpeETE2bCxHLDBwQMvdortkHnyjAfTgsHlHkSpA sx8Tqh6z5H6Y2KLFAxgV6SdUaQWD3szWgX3UXfBNy/0SaOIctpFOXNRNthOoHXx/rKWx ZVCX9URDkZE2mGxvxmlId2JVWD2I1zh0vzpyhqbrqbweS36v+eAuBM3gJVjB4hx7CKF2 uJhXvXDFQLCY0zpCkf/4n52uOyQpJQYhFTOtNiEf7TUPSue43GQsApGYZgaALYgfZTkd OZvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fdP1kDUB; 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 sa12si11874354ejb.276.2020.08.17.18.38.58; Mon, 17 Aug 2020 18:39:22 -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=fdP1kDUB; 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 S1726856AbgHRBiG (ORCPT + 99 others); Mon, 17 Aug 2020 21:38:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726596AbgHRBiF (ORCPT ); Mon, 17 Aug 2020 21:38:05 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70DD8C061389 for ; Mon, 17 Aug 2020 18:38:05 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id s15so8978854pgc.8 for ; Mon, 17 Aug 2020 18:38: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=k/dwpDf9Rw0FIDL5Sc/gG8pBkCydPXuy0KjMx4jHUik=; b=fdP1kDUBSxES6CBl53KvmYKvwA0Z3vrdvU06fKTzc2faC/ipJowPp//eQgrYU/IjI+ 03e81fdMqVmLCHL8RLLdK90amj9EHOfIMrtMhkBIegA6+6JKv7+TVQy+VikU4L1coH6v gnWWxAUWbnsqfpxlyyWaPnWJEi1rr5S3uBpjM= 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=hrdNO1SC8Ez1IPdvDVCF54UaFuxGGDex3umVixMb4ldi43NqSG3F5mrBKy1PBO0luA HVrMnjluXcPQBm6ytHrc5iER6tDcpasGqjy9PHPdo4coKTR/7q0gme+/QSgHdULFrvQX yjskFjqmEIYMG0iT6MW4C/CkW5XPHoD/h/tkPusD5Th+G/SArsQG8UrTM10ZQyrbCQkq wmYksRI3XhXyE3RYSRec81GVOUwajGMjCDxjTd3zTOqn8+8CoT3YGgQ0JgNvFY3p9yio 3mxc64mMVc42xT/6h8XLkbaDHAduKqT4GBEGfGY9fq/X6xvph69Qq7w5JNQhooRGEhay NQig== X-Gm-Message-State: AOAM533hKDV+2Mns1Ei6J2kPddXHanx/sxN5VDIncvTyoIHQgsB2nUdo lBr5DVcB1zGGPpNAcUXd85WSmw== X-Received: by 2002:a63:f24a:: with SMTP id d10mr11680932pgk.4.1597714685036; Mon, 17 Aug 2020 18:38:05 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:f693:9fff:fef4:a930]) by smtp.gmail.com with ESMTPSA id gz7sm18993784pjb.45.2020.08.17.18.38.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2020 18:38:04 -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 v6 2/3] virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature Date: Tue, 18 Aug 2020 10:37:43 +0900 Message-Id: <20200818013744.3327271-3-stevensd@chromium.org> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog In-Reply-To: <20200818013744.3327271-1-stevensd@chromium.org> References: <20200818013744.3327271-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