Received: by 10.192.165.148 with SMTP id m20csp3332033imm; Mon, 23 Apr 2018 04:55:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx49mX9TNNiW88PKf0O0WVUPcw7vF/Q3QyLZ8DHQBMGtuNKjYad7FeGAU2ZNxG9Wvgm+XHszO X-Received: by 2002:a17:902:5389:: with SMTP id c9-v6mr10871310pli.143.1524484536954; Mon, 23 Apr 2018 04:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524484536; cv=none; d=google.com; s=arc-20160816; b=IBgCFKRfmPU3L6oJuzGnlrtdbpPfgT5eOrKwFyiwLkYIkqgKQzN3eBmyUhMcLww0L3 fZbtouPFVnyPLDB8/l+aUACmSt7u60HNi21U10h4RpAxXZ5ixctzJysBqwi6Q9JxlXRG lFH2x98jpeVN35duKolFHLSjy9tpSu4Z/dfHHByfXO5Nuo6XWmVrufb+pBGxptyw5FPH Tai7PIURTQf+nOFL1cF2iL8FfXR4ecWkR5WqOiFXEbKvVL64ixRxMDKDMCJ8QUtVHab/ HJd5K9MkjEXSdo/sbQBuaPorZ5YO4RSAUyJDjAo8v7CHq2ytAuMNHyEvussAlb4tBkzI Z/kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=3aZqgXmWkGSF5t6AmXpWzxx5/FHWTqO/YEw3Ao13XDs=; b=a0MDvnnUsExX5ItltZ6+VuRcmtosju+s0Jb+4XQYx3MpVkdWWlwdutIeGz+r3d2bii X65lBVa0X7s1a4Ijc7VDgqZqoLxa3n1IY1kccOWJwawFwNaDYBi7w8GXLKQnuTCZhLdV kS1u1cmCgU8MTI6eBf2nOl1nl0efpsIyHRnXFUI4jam2eoswXsVvipPWe3BVxFpG81v9 MU5UbjX/ViUqoKsNwvuyfT4U7wR3IGWmtI08VSwKBqr6Oqy7JNNH5vq6Kux/3q47pnn3 YwBNPDYhTJ1tpOpT35Akm3cZkn5EYL0fPIlU3ekya5/IZYwjQQsBbeLKdoumnN4LNgHj mZog== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6-v6si11496755plp.544.2018.04.23.04.55.22; Mon, 23 Apr 2018 04:55:36 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754930AbeDWLw7 (ORCPT + 99 others); Mon, 23 Apr 2018 07:52:59 -0400 Received: from smtp03.citrix.com ([162.221.156.55]:6351 "EHLO SMTP03.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754820AbeDWLw6 (ORCPT ); Mon, 23 Apr 2018 07:52:58 -0400 X-IronPort-AV: E=Sophos;i="5.49,318,1520899200"; d="scan'208";a="52433439" Date: Mon, 23 Apr 2018 12:52:43 +0100 From: Wei Liu To: Oleksandr Andrushchenko CC: Roger Pau =?iso-8859-1?Q?Monn=E9?= , , Artem Mygaiev , Dongwon Kim , , , "Oleksandr_Andrushchenko@epam.com" , , , "Potrola, MateuszX" , , , , Wei Liu Subject: Re: [Xen-devel] [PATCH 0/1] drm/xen-zcopy: Add Xen zero-copy helper DRM driver Message-ID: <20180423115242.ywdwqblj2aseu3fr@citrix.com> References: <5d8fec7f-956c-378f-be90-f45029385740@gmail.com> <20180416192905.GA18096@downor-Z87X-UD5H> <20180417075928.GT31310@phenom.ffwll.local> <20180417205744.GA15930@downor-Z87X-UD5H> <41487acb-a67a-8933-d0c3-702c19b0938e@gmail.com> <20180418073508.ptvntwedczpvl7bx@MacBook-Pro-de-Roger.local> <20180418101058.hyqk3gr3b2ibxswu@MacBook-Pro-de-Roger.local> <20180420071914.GG31310@phenom.ffwll.local> <76cdc65a-7bb1-9377-7bc5-6164e32f7b5d@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <76cdc65a-7bb1-9377-7bc5-6164e32f7b5d@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 20, 2018 at 02:25:20PM +0300, Oleksandr Andrushchenko wrote: > > > the gntdev. > > > > > > I think this is generic enough that it could be implemented by a > > > device not tied to Xen. AFAICT the hyper_dma guys also wanted > > > something similar to this. > > You can't just wrap random userspace memory into a dma-buf. We've just had > > this discussion with kvm/qemu folks, who proposed just that, and after a > > bit of discussion they'll now try to have a driver which just wraps a > > memfd into a dma-buf. > So, we have to decide either we introduce a new driver > (say, under drivers/xen/xen-dma-buf) or extend the existing > gntdev/balloon to support dma-buf use-cases. > > Can anybody from Xen community express their preference here? > Oleksandr talked to me on IRC about this, he said a few IOCTLs need to be added to either existing drivers or a new driver. I went through this thread twice and skimmed through the relevant documents, but I couldn't see any obvious pros and cons for either approach. So I don't really have an opinion on this. But, assuming if implemented in existing drivers, those IOCTLs need to be added to different drivers, which means userspace program needs to write more code and get more handles, it would be slightly better to implement a new driver from that perspective. Wei.