Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2891845pxa; Tue, 18 Aug 2020 00:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0CzZqepxItHuvLUy+WcsylRteCiO/yA6cuVf2dGhULlVFTj8CcN26Nz8YgP5v5Ab7ta2I X-Received: by 2002:a17:907:4303:: with SMTP id nh3mr19253805ejb.520.1597734898298; Tue, 18 Aug 2020 00:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597734898; cv=none; d=google.com; s=arc-20160816; b=e08x886cwMPWZUCSPU0T/OoaUpZiRdxCUKA/OO0v5hkFj1+LERVTrnNKtbjjwNwM1s FAhAEYSTW5Spl0MN/qm8sbFFkcjFqi+SNMRuiJjTs6gBfz1j/sLVn/6dUajaQMBRJAU+ HQHHySXTwRBF2c04JsUOnQjvEgYa447wyzhEQOE7nfbmn2fRSKxohibBU5s/Td9fQ0x9 eUnuGvkdsMZgy/CPub/4sKmx80mePfJXNbEepekBk4ESHArIHBFBCbGZ000mccYArqip mrbodjxBkwbicKvoxxFJM87LCC+DKDOBCy1LUyDOT+1vSo60jSpUPT+pbF4hVr6/z2x9 Uh3A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=BgH1OQJe0vDcind90faXlTgA3YjOyLHfHtqyBUp1Czc=; b=N7aJ9eDtC52a8MIqukDz8JxvSmRqAWhi7bUqZnoSlWffZ18u4ZPz+7OYX9kA67LOBE ZZfm6M2UpJslu39xJa49+t03b4mrcySp5mc2jP9ZFagTuEhjFDQvABOdoTDbLlr+TGTz Yp8x5spO54d49yD77DTipkqMYDsXKKQvxrRwjPXDEWwuDlm+JOldysvJQxqpHKhS4ZXX DQq7XHflq5FI53QfKnQCi9uheBoyWWu72FAhkjkPwwDa+mYnnUuJRaxwWLQUzZZ96WlR ialnFcy17eT8aXpr3BE+HPABhZ2QmtWfBsrrPKPgj6O3JWTvveJPenDXx9gJ881iGtt2 4lmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=jBhQriRw; 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 m22si12016709edr.374.2020.08.18.00.14.33; Tue, 18 Aug 2020 00:14:58 -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=jBhQriRw; 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 S1726228AbgHRHNv (ORCPT + 99 others); Tue, 18 Aug 2020 03:13:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbgHRHNu (ORCPT ); Tue, 18 Aug 2020 03:13:50 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D89AC061389 for ; Tue, 18 Aug 2020 00:13:50 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id t10so8784411plz.10 for ; Tue, 18 Aug 2020 00:13:50 -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:mime-version :content-transfer-encoding; bh=BgH1OQJe0vDcind90faXlTgA3YjOyLHfHtqyBUp1Czc=; b=jBhQriRwN1E1G4yJ7yJ5QVDbR3yI60qfxFdNsiw1JCtEbsa6GBtVj3rXYqfrkw1aRi BBFDqgJ42hRBKauGzagAsCP9lo2zL3e6eFXcUOdjV3WZq3DzR1tibyoqkNwHzvl0SAos v5Yv2iK3XSVROgT7Y2Z9jT9El0Eh8HaHTb83E= 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:mime-version :content-transfer-encoding; bh=BgH1OQJe0vDcind90faXlTgA3YjOyLHfHtqyBUp1Czc=; b=OpnjEWQMADjVE+pZ7ERiLRUCXNs6VTr1HBlQOTpd7fj2DohAcv+Z9BUpDxmmlszFNj R0JTq1rok6RI4XcDbmfUDEXbP1huH4dDjL2BcqEhR1Fptkf7UfGrOLDoucJaxW/TeLQI 8ktNf5YonjUkq6r8L0uBOkloJWr2yAizySrg8V1AV/mNcJtA/pWQAQurZAXnDtNxT8Qf EK8BUcKFsTWyM08NxwhB2NL8u6fc9S5TlpNxMX9VBMPh0JMCeA5m1TDbWyOz81blzkVb 2XEJO533d8XGa+QkM36I9H0ghfQqRispT3pqFkRLG2/KnTJac417qM1lEGCxMlvm5PF4 KcgA== X-Gm-Message-State: AOAM53156lkmyIw7TzoCNO+m2LtJdsGmceXtVz2wV7WThaZYuXl2p5F9 UKkQT+R9r4EuuVgSJQ/ldv/GWQ== X-Received: by 2002:a17:90b:1c06:: with SMTP id oc6mr14823420pjb.182.1597734829705; Tue, 18 Aug 2020 00:13:49 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:f693:9fff:fef4:a930]) by smtp.gmail.com with ESMTPSA id g33sm15709005pgg.46.2020.08.18.00.13.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Aug 2020 00:13:49 -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 0/3] Support virtio cross-device resources Date: Tue, 18 Aug 2020 16:13:40 +0900 Message-Id: <20200818071343.3461203-1-stevensd@chromium.org> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog 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 patchset implements the current proposal for virtio cross-device resource sharing [1]. It will be used to import virtio resources into the virtio-video driver currently under discussion [2]. The patch under consideration to add support in the virtio-video driver is [3]. It uses the APIs from v3 of this series, but the changes to update it are relatively minor. This patchset adds a new flavor of dma-bufs that supports querying the underlying virtio object UUID, as well as adding support for exporting resources from virtgpu. [1] https://markmail.org/thread/2ypjt5cfeu3m6lxu [2] https://markmail.org/thread/p5d3k566srtdtute [3] https://markmail.org/thread/j4xlqaaim266qpks v6 -> v7 changes: - Fix most strict checkpatch comments David Stevens (3): virtio: add dma-buf support for exported objects virtio-gpu: add VIRTIO_GPU_F_RESOURCE_UUID feature drm/virtio: Support virtgpu exported resources drivers/gpu/drm/virtio/virtgpu_drv.c | 3 + drivers/gpu/drm/virtio/virtgpu_drv.h | 21 ++++++ drivers/gpu/drm/virtio/virtgpu_kms.c | 4 ++ drivers/gpu/drm/virtio/virtgpu_prime.c | 96 +++++++++++++++++++++++++- drivers/gpu/drm/virtio/virtgpu_vq.c | 55 +++++++++++++++ drivers/virtio/Makefile | 2 +- drivers/virtio/virtio.c | 6 ++ drivers/virtio/virtio_dma_buf.c | 85 +++++++++++++++++++++++ include/linux/virtio.h | 1 + include/linux/virtio_dma_buf.h | 37 ++++++++++ include/uapi/linux/virtio_gpu.h | 19 +++++ 11 files changed, 325 insertions(+), 4 deletions(-) create mode 100644 drivers/virtio/virtio_dma_buf.c create mode 100644 include/linux/virtio_dma_buf.h -- 2.28.0.220.ged08abb693-goog