Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4245457ybf; Tue, 3 Mar 2020 23:49:14 -0800 (PST) X-Google-Smtp-Source: ADFU+vs3wavA1kojTM71oQbC/2SYkxCBaZubPrxyNm9PDnM3HD5igHktNiaRxsh3o7UMm4zKhhsl X-Received: by 2002:a9d:6310:: with SMTP id q16mr1263485otk.147.1583308154118; Tue, 03 Mar 2020 23:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583308154; cv=none; d=google.com; s=arc-20160816; b=FQePKQh/xL0mhkywnUYjigiBR364q4IIT7M3Oe2ma/7DFd0PL45sIZNT5pfDUMas58 ACxL/WSFJt5uw+XlLViQOO+n3OvCw9s/guOjPufMPUoafNYxvpuaZI8sXblFRF97CfYn AHNdiGuXKL0CzXtbSvEBj7Y6fGdVhBUWQYzYIiQSzeoZT+wKAxR3K09PjRPvP9KaOdiB vZVIHNqANrmxHAoAFvi2cahJNgnt1/+NNp4mKkVh1OYmsKPAdqgfSpW6SQbFCwTylODG W+MJ09bNximWE0E9sJt0InunnQrbzsbd167xTLphcaOS84FDCNAiOkVFsMsvCQcy8dAH IKYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VHfVr/tC6mnm30TtswDnaZCgkdF5cd/cEuR4XHAYi4k=; b=Pt+5P1e5fcxuCowoHhqBQ+EbPmNC68uD6w7SbRxT9G0DHpXkbIpJv5Y45jNReE+DOi p5CVuKiUBqD6tXKsxc9isHRDlBV+RAQeEr4luUTr0rnhKXiKl52OkS6l8iylpGMAWXFX NgeHNA3F1COMx5EDdjX5f+gyzH32lP1NKNd+uM4HZ8VkJDYGNMSOcAO2KnRbk7dwviwj 4ww2xHr0iu+WO04Vsyg+6py3sp6Bnpe1BVLh0yEcda250mI1wie2MP79De1trpdN4wsG +T+xNnUT1W5ATk4Y4AQvUH/wa+/tckTpWpp1XFwjnTzdEWdTTVLnmbtE1Vt0Tbt90DrS iwrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZS4i3XB5; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4si822562otn.207.2020.03.03.23.49.01; Tue, 03 Mar 2020 23:49:14 -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=@redhat.com header.s=mimecast20190719 header.b=ZS4i3XB5; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728635AbgCDHsv (ORCPT + 99 others); Wed, 4 Mar 2020 02:48:51 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:28367 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727176AbgCDHsv (ORCPT ); Wed, 4 Mar 2020 02:48:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583308130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VHfVr/tC6mnm30TtswDnaZCgkdF5cd/cEuR4XHAYi4k=; b=ZS4i3XB5kv2K/meeUGmtOB9Bz22zTb3Ar2gAte/8fhDO9+SyVZBMQLmG9tfe+KhwcnmwUl qgot3LxBKoahAaVECoQI+LEyAV5KlyC3iDJJzZIysDgoKW+QRFiAEEYsfT8/aItgoPg8tF P9/bfvnj7ccYvr8KWV8JCMdRSx00Zrg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-467-fXX0MZD-OeewdNcRAR5oGg-1; Wed, 04 Mar 2020 02:48:48 -0500 X-MC-Unique: fXX0MZD-OeewdNcRAR5oGg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1483C8018A6; Wed, 4 Mar 2020 07:48:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-150.ams2.redhat.com [10.36.116.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id EBD0891D6E; Wed, 4 Mar 2020 07:48:41 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2D00B17506; Wed, 4 Mar 2020 08:48:41 +0100 (CET) Date: Wed, 4 Mar 2020 08:48:41 +0100 From: Gerd Hoffmann To: David Stevens Cc: David Airlie , Daniel Vetter , "Michael S . Tsirkin" , Jason Wang , Sumit Semwal , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , 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: Re: [PATCH v2 1/4] dma-buf: add support for virtio exported objects Message-ID: <20200304074841.gbfzhxorta3pfk4f@sirius.home.kraxel.org> References: <20200302121524.7543-1-stevensd@chromium.org> <20200302121524.7543-2-stevensd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200302121524.7543-2-stevensd@chromium.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 02, 2020 at 09:15:21PM +0900, David Stevens wrote: > This change adds a new dma-buf operation that allows dma-bufs to be used > by virtio drivers to share exported objects. The new operation allows > the importing driver to query the exporting driver for the UUID which > identifies the underlying exported object. > > Signed-off-by: David Stevens > --- > drivers/dma-buf/dma-buf.c | 14 ++++++++++++++ > include/linux/dma-buf.h | 22 ++++++++++++++++++++++ > 2 files changed, 36 insertions(+) > > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c > index d4097856c86b..a04632284ec2 100644 > --- a/drivers/dma-buf/dma-buf.c > +++ b/drivers/dma-buf/dma-buf.c > @@ -1158,6 +1158,20 @@ void dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr) > } > EXPORT_SYMBOL_GPL(dma_buf_vunmap); > > +#ifdef CONFIG_VIRTIO > +int dma_buf_get_uuid(struct dma_buf *dmabuf, uuid_t *uuid) Hmm, I think I would drop the #ifdef cheers, Gerd