Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp246532imm; Wed, 30 May 2018 22:52:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIdOtWyYj26/c6dSEWfWj1tJXAGIpXR3aKDlkoGt7OgtRr9743+SZhrUcqsyR38eBHGrvm6 X-Received: by 2002:a62:4f4f:: with SMTP id d76-v6mr5464931pfb.188.1527745960628; Wed, 30 May 2018 22:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527745960; cv=none; d=google.com; s=arc-20160816; b=zGufilCsJIJU3AWabnlXv014qySp/JTRgrxJGN81gSt43VRsTpUMGpZbmnxPhBZfFU 9U0O2XrkUtNPg4vp8Mn72+3wNvEgxqI2/RURzRu9UvpjhLCsaP1WDMbkmqAPvDMxlNJm 7ZNcXiU5TaTkCXfdcof4kwTTcOLJwxCBmeK3ZMsioZjqRNYGXYi/ilnPcd7gUK71JWqX qYCO1GkRXGis7VZPjnC04k+IV0XkvQu8W2P4Uid8VTzXuIho4cHw/c9gmE1+ZrFRqWeC 2i0MrK9W8OynRTdoDOpXQjOpoIp9di+QK5hJXaRFNsGKhRuL7uX4ZLEdjVIyaMdduDmw Bm3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=P4yZNOQgzSNJM0iuTYKCZAlVl3BT9kpzY1xCJTu46E0=; b=ZBsfBrp+DQ7pp1Jmcra3ikvaGqJwUVpv93ONuUsTY1xpqOityiSFmnL1tZ0b+b417s bA+gu504mj5gTUrTMsKT0Fseogk7i0cmHq93lU+X59i6CZ52w9+3n5bC7o+PxOkjMd6Q PxPQOt1T3H60aCXtKvTg+VooOScH1NWQOJXRpPmDSQ3hbl5iBmMYw7A8hbXbtQAu/AN7 DnkBFzO5pPgTf/XuvBA0nVKurCQbP1WK7e4ZK/anzt5KuntMP8186k/3twj7OsBkYE5s P29/rUDnMl6liUSj52HQ5/yjahBmEoaZ1VbGa9Bx89DpSWdTDTKISEsgezC07HDG7wTP Y0VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nHbOUJ2j; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si36715276plw.519.2018.05.30.22.52.26; Wed, 30 May 2018 22:52:40 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nHbOUJ2j; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753971AbeEaFvo (ORCPT + 99 others); Thu, 31 May 2018 01:51:44 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:43646 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753928AbeEaFvj (ORCPT ); Thu, 31 May 2018 01:51:39 -0400 Received: by mail-lf0-f65.google.com with SMTP id n18-v6so7856244lfh.10; Wed, 30 May 2018 22:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=P4yZNOQgzSNJM0iuTYKCZAlVl3BT9kpzY1xCJTu46E0=; b=nHbOUJ2jNr5si31uiLEVLfEoPP/5CYHXXI6I6eM7wXx/7vaWbQeN8euJ+AWKMR1bds lwE9XuqlA6MXBjPKeXn/yHZwqDp4vrLpsfrBD/s1M7Qudt+wHhHnlRalWxZXQSqiEPbS z2TWYalE7HzM8jxtB8/cLz33Y5GLYztR3qkmaaE5KRI0cLWoFLwpTmnK7TDAR7VG38cJ g4PEJapyCqd4NyMzPPCeFEZNHixSPD5gwfFntN1QShMGTCegttIMyTOIY4f2Q/xkZV9Y EKZ+SFb1r6w8ijB2XyEfntkKIoq7u7Nm1aoxDW3X3PLnNpQRLvXXef8brOXpC5/bNaTu MPzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=P4yZNOQgzSNJM0iuTYKCZAlVl3BT9kpzY1xCJTu46E0=; b=L3ex7Oqv1+er7tTYpjiwm/1ocRvCGb0gy4UfPUQVLRV4H+6qP2E7G5FPwLT7RWMh5g QrX7EAnN7elHdEXfSamPZky5ZCYdKbBZLq/9TY02M7xIEi5MBOQWtEGz6b5N1cFEM5dR HS1ThIav8lsryttmA6SHvbj40t10s9Xc/a8JQvo2LIJh8vgrlbCu+iLvGowg7VeAoSEB 4GourKqmteuUmF7CHuqj1IEHl0aZ3bO8OheVkp9E73QtQKLq2rBs1yveoRXoF41RDKUh y8ULLrqQQY477DBPNUu6iG6VU+4e41oMTN6xZLtKzvlXjr8oMH+1ys2ik4BDtHOmmmtt 3qWg== X-Gm-Message-State: ALKqPwe/GLu5Tt2w8PdM1orASRdMNMkfDd+igfW1OMM0oe6DcDeS4zVa 0LUPilRFErMoBh4C/vXnXe/4fYZRlow= X-Received: by 2002:a2e:9706:: with SMTP id r6-v6mr4002233lji.5.1527745898016; Wed, 30 May 2018 22:51:38 -0700 (PDT) Received: from [10.17.182.9] (ll-51.209.223.85.sovam.net.ua. [85.223.209.51]) by smtp.gmail.com with ESMTPSA id y18-v6sm7330455ljc.52.2018.05.30.22.51.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 May 2018 22:51:36 -0700 (PDT) Subject: Re: [PATCH 0/8] xen: dma-buf support for grant device To: Boris Ostrovsky , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, jgross@suse.com, konrad.wilk@oracle.com Cc: daniel.vetter@intel.com, dongwon.kim@intel.com, matthew.d.roper@intel.com, Oleksandr Andrushchenko References: <20180525153331.31188-1-andr2000@gmail.com> <9687b6e5-808e-0c63-34c3-90e6fcbdfb2e@oracle.com> From: Oleksandr Andrushchenko Message-ID: Date: Thu, 31 May 2018 08:51:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <9687b6e5-808e-0c63-34c3-90e6fcbdfb2e@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/31/2018 04:46 AM, Boris Ostrovsky wrote: > > > On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: > >> >> Oleksandr Andrushchenko (8): >>    xen/grant-table: Make set/clear page private code shared >>    xen/balloon: Move common memory reservation routines to a module >>    xen/grant-table: Allow allocating buffers suitable for DMA >>    xen/gntdev: Allow mappings for DMA buffers >>    xen/gntdev: Add initial support for dma-buf UAPI >>    xen/gntdev: Implement dma-buf export functionality >>    xen/gntdev: Implement dma-buf import functionality >>    xen/gntdev: Expose gntdev's dma-buf API for in-kernel use >> >>   drivers/xen/Kconfig           |   23 + >>   drivers/xen/Makefile          |    1 + >>   drivers/xen/balloon.c         |   71 +-- >>   drivers/xen/gntdev.c          | 1025 ++++++++++++++++++++++++++++++++- > > > I think this calls for gntdev_dma.c. I assume you mean as a separate file (part of gntdev driver)? > I only had a quick look over gntdev changes but they very much are > concentrated in dma-specific routines. > I tried to do that, but there are some dependencies between the gntdev.c and gntdev_dma.c, so finally I decided to put it all together. > You essentially only share file_operations entry points with original > gntdev code, right? > fops + mappings done by gntdev (struct grant_map) and I need to release map on dma_buf .release callback which makes some cross-dependencies between modules which seemed to be not cute (gntdev keeps its all structs and functions inside, so I cannot easily access those w/o helpers). But I'll try one more time and move all DMA specific stuff into gntdev_dma.c > -boris > Thank you, Oleksandr > >>   drivers/xen/grant-table.c     |  176 +++++- >>   drivers/xen/mem-reservation.c |  134 +++++ >>   include/uapi/xen/gntdev.h     |  106 ++++ >>   include/xen/grant_dev.h       |   37 ++ >>   include/xen/grant_table.h     |   28 + >>   include/xen/mem_reservation.h |   29 + >>   10 files changed, 1527 insertions(+), 103 deletions(-) >>   create mode 100644 drivers/xen/mem-reservation.c >>   create mode 100644 include/xen/grant_dev.h >>   create mode 100644 include/xen/mem_reservation.h >>