Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp129306ybg; Mon, 8 Jun 2020 18:28:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2RKCvGoBa16camn6V+4RM3ZS8HQ5q4LKSMr/NAkLAIlhLzK3ODxqbBtqwnsc27d2F7Omc X-Received: by 2002:a17:906:468e:: with SMTP id a14mr15966499ejr.124.1591666080540; Mon, 08 Jun 2020 18:28:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591666080; cv=none; d=google.com; s=arc-20160816; b=p1ig8XIOk9pgtw2W7WKmLb0GzZaWTjF4hOT1l0vg4KqpwuR911OQJpMg6KLV8vwkj8 KMIGEJf/eWvbqJFi8NV2H34SIVuLk7Eqdc5eKgXupQthx0Or/3RkW91TMMXU+l8WQTao 6iu02bO6wEP9x3C//sFMr0nlyd3lHzeEiN9q9yNipj51B9FZK/DB5iLFI85utTlVXrRk JkLi2ROyTfJ0ZrFSF1RnK99lH1z/wVNdvH2cOPt1XYvas9uTKePD+QyWqRKMHzaWs3bw KOhPiuf85IXCNYnf1nIrkosCnfbTRfSfKSGCdaTCo99n8xQGEpH3fCOA+xgPjVpHp/LO ye4Q== 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=COw8MsymzwRUQaCcvby30uu+ORzSh+2s4CK8yqEnGk0=; b=naKJv2ScEqaDVLQoz8AxwxqPzTw1FjpDoIu+TEBgLXiKlkg6QR3Nql/S0yxaec/cUl Bum1V1W3IPiGOX9EE/MhisZN17Us7yNdMecd28gNjHS0FZWlGTbcgMDd9QEN7fc20ADE 1mIXhZhPcbXi0zibOwT+OOLuY2od6b2whO89vV0ZM+zv+IcOtt96rQGuJmkjZX72ZIwD +30cFYgG4oqc5Pf9UPlYkU7Gw4MBY0/V6Ps18uQrQ4esS5d1A2f3OV9T79GRN4Kmafee aOGZ8cyINB1bLZkcu9Ecan/o5q8JhG0AhlmhL/Igo3g/vpbr83IdeSntwm5brlSU3cEi G6rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=m4U6w8Hj; 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 mc22si9525938ejb.655.2020.06.08.18.27.37; Mon, 08 Jun 2020 18:28:00 -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=m4U6w8Hj; 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 S1726977AbgFIBZu (ORCPT + 99 others); Mon, 8 Jun 2020 21:25:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726907AbgFIBZs (ORCPT ); Mon, 8 Jun 2020 21:25:48 -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 9F14EC03E97C for ; Mon, 8 Jun 2020 18:25:47 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id h95so636616pje.4 for ; Mon, 08 Jun 2020 18:25:47 -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=COw8MsymzwRUQaCcvby30uu+ORzSh+2s4CK8yqEnGk0=; b=m4U6w8Hj6efLuU2XJFCP8IPM+30vKQRX8BKy4OU/D+DUTmyH9XKbfEELFpSz42f7a/ a3V6e3lrKLFyYc13GVhfa4CdVD7sYJf2xvK5y5RWC823y9VUiUO/9hdCrABpETL9VLNp ypI6smgxA7gnRqgf3Gf8k99kM728ZEUHZIKPQ= 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=COw8MsymzwRUQaCcvby30uu+ORzSh+2s4CK8yqEnGk0=; b=LmtRqgBzaoSwbZDcgor5GOlnSO22Q2bmD9tpn0oidVkL0kPNVR4nQ+s4FhUO6Z9eXL gb4GpZ5v+Ep9ZFrM/cPF+KidAaNo+pskW5Nj8ln1YaO3ItHHuDgooUqpbR7Yz6dK4k2+ DNcMsPvUSMBk1D1zb1bNuX4H8EymQANQeKqa4c6vfzVmAVM5E/4lCNqsp862LrcxIbeJ h/WFJrwEmvQ15Zkqwrj76zNAbw4C17zD+Sev+Nk6IYlhX6MnTsxESht7bzDCEI9PDaKV D02WZHV6pBVSqLdSzV2YzVp2ybN3xsASPPynfH2KFbLMm4X983ZmrUO/MTaEDJgU9V3X 5jJg== X-Gm-Message-State: AOAM531mbBzBUdNkBwHKt9L4m5zSOZN80PK01l7aFTX6j6I2n87EOaMO WGdXEaTPkICa0Gxac4OtsixMlg== X-Received: by 2002:a17:902:9043:: with SMTP id w3mr1170254plz.250.1591665946907; Mon, 08 Jun 2020 18:25:46 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:30f2:7a9c:387e:6c7]) by smtp.gmail.com with ESMTPSA id z23sm6716617pga.86.2020.06.08.18.25.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2020 18:25:46 -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 0/3] Support virtio cross-device resources Date: Tue, 9 Jun 2020 10:25:15 +0900 Message-Id: <20200609012518.198908-1-stevensd@chromium.org> X-Mailer: git-send-email 2.27.0.278.ge193c7cf3a9-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 v4 -> v5 changes: - Remove virtio_dma_buf_export_info. 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 | 20 ++++++ 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 | 82 ++++++++++++++++++++++ include/linux/virtio.h | 1 + include/linux/virtio_dma_buf.h | 37 ++++++++++ include/uapi/linux/virtio_gpu.h | 19 +++++ 11 files changed, 321 insertions(+), 4 deletions(-) create mode 100644 drivers/virtio/virtio_dma_buf.c create mode 100644 include/linux/virtio_dma_buf.h -- 2.27.0.278.ge193c7cf3a9-goog