Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp977560ybk; Wed, 13 May 2020 19:10:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBlVXhlT4+rzYe5OW8R8hfrJf2LztA/51xfCJkMrKm239vaAJz9TvpEpHqDXFVLwODL3wn X-Received: by 2002:a50:9a04:: with SMTP id o4mr1985658edb.289.1589422252697; Wed, 13 May 2020 19:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589422252; cv=none; d=google.com; s=arc-20160816; b=04rELmd1r7garhzx/nLDKeaxYnx0M7cEkxwnJzap+Cvkslyp3DNzlya1xFwylpACwP WZTAmPN9DvtGjTE6snpPhxDjfKJC8C6QvrWl0DOlln9Ya9W2TxiNQfqsjHPvAwAGpsEa 4QzbOZ1y0WTHU/FMdaJxKUGlLH6ibOCYfy0gH6PQ0+S0Wu89TlMW5wBiwI4f4vYWJhOf GipvxR1xuEMDiG8jAg3S2XUj9o41pCTbT3o+Ifxros5OAv+ubdwA9Aqx+iklTh3Z/TM8 xAmT5tpnGU/ceu86Ka7C0YRJ5C5Fisyx++/4juVc3cnc3hiht33ouvOvGhWpCWGhlK5X ly5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=iwY0Acbl9lzYaC/I7H5xpC4oYprSXfs6U4SArioBGuQ=; b=QQEHl1wIFS16Qwsy9rHxC5EIr0HRSbrlJDDQlfTOz88hUry7WsLTEW2ZNr4cZJPF/h 2AjwbiHLVMHKzovtdaIzYk64KXEiRLBZoy1tZtZ8/PYTc0LyQq2ilbYKbZVwrv2d98hk rIr4NcCrlX9WTNz/+k1W1sY0srP3bjsuCtpSDqn+7byYm16qhpE4aMVKRpoHlRMU3Qsa Q7RbcPlklpJ7vbAjSeHDcL1/eNCRPV2u2GFc+4m284gMo4tTyUMCk4aChIQEt6wl57JW dEnaRHK6WfI87FdHV670B0FPFa2vLs5GEHX8h8dIlyLtnq+GA3fNgw9bjZtF9jo0/iJS IksA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P3DlHD88; 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 p22si781716edx.177.2020.05.13.19.10.28; Wed, 13 May 2020 19:10:52 -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=P3DlHD88; 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 S1726061AbgENCJG (ORCPT + 99 others); Wed, 13 May 2020 22:09:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725952AbgENCJG (ORCPT ); Wed, 13 May 2020 22:09:06 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EF43C061A0C for ; Wed, 13 May 2020 19:09:04 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id v15so965227qvr.8 for ; Wed, 13 May 2020 19:09:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iwY0Acbl9lzYaC/I7H5xpC4oYprSXfs6U4SArioBGuQ=; b=P3DlHD88DQf0dE0yDif2sw8Rynd10kLlNJTPW+b9QzdH57TyxXfF5ZNS/0Fw6PFJCG QW3kwdavSpCzJ1MTCu5QDGOqFbkR1lWztvohYFPSV6iT0JGQlY5iifKdUt621KTCAsGm 9eeWjr+VlkkDTRsgo5ySgNBAgv+vYZS8h+BUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iwY0Acbl9lzYaC/I7H5xpC4oYprSXfs6U4SArioBGuQ=; b=fh/IyUJENvykGPY2Mq8haOzSfcpyTw1cESslHLtAbzY+OI5/z0YWk2nqfgPZvGb0sY 0uHBk2pQiyJ3Q7nyX4E73cwUWGd3pTz/xfOuy65J43AMK2DvfYGV+OduIEIXBcqIc88c 1k5ySc4zp5LJuKOpJnyFGhEK56dXFG0kizAIa60V25Ko57iSbYeAV6ctz7eRskdX9MFQ j/OVRtCZXxkk33Xbp/BjeNkyg6HpAmfrZtwWhzs2WFvRUSKxuAwIc/sAHP2F99wNEKLF i9pb6Ob0RajdnF4l5UEZcZ1EKXqgUDI2Uvi8dKGrFNpNVSEq6neNpuel/s32ir0KUNKZ V2Uw== X-Gm-Message-State: AOAM532yKk5Qm8PSHrWgn/RDm4VV/NmrPL/534bEtfwIzXr0ftchwdEr RZ0lR0jM3a+UkVBCePANQENrXKiU7WhEyS7yYedS+w== X-Received: by 2002:a05:6214:506:: with SMTP id v6mr2657680qvw.70.1589422143646; Wed, 13 May 2020 19:09:03 -0700 (PDT) MIME-Version: 1.0 References: <20200311112004.47138-1-stevensd@chromium.org> <20200311112004.47138-2-stevensd@chromium.org> In-Reply-To: From: David Stevens Date: Thu, 14 May 2020 11:08:52 +0900 Message-ID: Subject: Re: [PATCH v3 1/4] dma-buf: add support for virtio exported objects To: Daniel Vetter Cc: Tomasz Figa , Gerd Hoffmann , David Airlie , "Michael S . Tsirkin" , Jason Wang , Sumit Semwal , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Linux Kernel Mailing List , dri-devel , "open list:VIRTIO CORE, NET..." , "open list:DMA BUFFER SHARING FRAMEWORK" , "moderated list:DMA BUFFER SHARING FRAMEWORK" , virtio-dev@lists.oasis-open.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 14, 2020 at 12:45 AM Daniel Vetter wrote: > On Wed, Mar 11, 2020 at 12:20 PM 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 > > Adding Tomasz Figa, I've discussed this with him at elce last year I > think. Just to make sure. > > Bunch of things: > - obviously we need the users of this in a few drivers, can't really > review anything stand-alone Here is a link to the usage of this feature by the currently under development virtio-video driver: https://markmail.org/thread/j4xlqaaim266qpks > - adding very specific ops to the generic interface is rather awkward, > eventually everyone wants that and we end up in a mess. I think the > best solution here would be if we create a struct virtio_dma_buf which > subclasses dma-buf, add a (hopefully safe) runtime upcasting > functions, and then a virtio_dma_buf_get_uuid() function. Just storing > the uuid should be doable (assuming this doesn't change during the > lifetime of the buffer), so no need for a callback. So you would prefer a solution similar to the original version of this patchset? https://markmail.org/message/z7if4u56q5fmaok4