Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp301024imm; Wed, 13 Jun 2018 00:08:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK8qcGPnqXefQ7UVclqwuI9LtrhVZlIv7+e1PdOeCD+FGpDxMEU86XCWcLharQXA15Y13di X-Received: by 2002:a17:902:28c8:: with SMTP id f66-v6mr3950456plb.60.1528873733470; Wed, 13 Jun 2018 00:08:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528873733; cv=none; d=google.com; s=arc-20160816; b=re6PvcYjS/in/ukoRK+IyuhHEpF4eCMYDfvEmFD9kNviLw1NKElB9hXaIjaCSgwCr6 9Xji8aJ6BaUqbpPVJpx0E7m4QNfl9OWn29iqXvLUR1g0ta2RIe32jzndA3BoJufbrl1B M8TJqlJEgQeHKHknYOshHWQTukfvwj4FJTDXLILxbOqQ3J8XGPrA+n5VzpqmjurNKH5s XLOCqwrVDlmPARNWtrPUmj3TittxTLNUDbgjlOwpi3l+m/R+pSqwiQaGblUdYpfl2efA xkspkjM36n86m/H9e6K09bvYUXqXe6wXzzXiwYe1Wk5qf/sKFyUH+AhCPuP9iq2oaQeM Gnmg== 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=QAWQEoFARIkG4dOz9CjfoMlxDtMdgyCbNtsv05T+MNk=; b=XIjAHlAQxMt1FuaGwu5e+iHhBkru6aZaIMMsbRmsi6ywqfdVmPbp1AI+A0edBXpGAB vT68CrcTex31mIRxyaWaeeqiSzA/oQ1E8LTX0OOLKXwgthY1xO9N5elJUYtasba9JL7V p4udty85AC6wOIxYOCZRNbdKJfWldaG9jSAVJtibIPBXEpvmWNKk0aMLB1lZ59HTpWsn 89/GCHoMfD2oBZonxZfCLH1k+zJCWPLEddQ4EwzAU6Sth2YXRVqnuXngIQmMLpPb9j39 fnfKWUkyQufYPc/SWr2dZL0z/rdiAMpGhsIpCsuW8hklDVpAAxlO6KTahf95Bfkszk1K LXYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rqcDYain; 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 7-v6si2172238plc.179.2018.06.13.00.08.38; Wed, 13 Jun 2018 00:08:53 -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=rqcDYain; 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 S934632AbeFMHIG (ORCPT + 99 others); Wed, 13 Jun 2018 03:08:06 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:43211 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934115AbeFMHIC (ORCPT ); Wed, 13 Jun 2018 03:08:02 -0400 Received: by mail-lf0-f67.google.com with SMTP id n15-v6so2226865lfn.10; Wed, 13 Jun 2018 00:08:01 -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=QAWQEoFARIkG4dOz9CjfoMlxDtMdgyCbNtsv05T+MNk=; b=rqcDYain9scA8QH04hgPOzZtlmGuC+RPYChoP6Bp3PlXdx9UO8xMh8ZnDYcuG/BIJn YOsBbJTV8Zb0vJSMAb9YvckLOI/lnaaE7DGOuYf5nWmYmqwdIUK1HR0K0pbx+xKEuUjl TjpWVcdi6JJQX9HAJdEaaJhsmU4t8Zsk0GM8rnwD8gjfcaA2GAdTQCW1LDKDfF7h8urh k9eoWjwFItObLigdpiX+NooAW+gXUxo6Z3MV6KX3sg64FG/mNVRbxrUp9C/UBimVWrk3 WbCM7Hgt1X8PRklvPQTUXhVpht8bSVKt3lP3w+txX/hBKWTaKNLuOVorUZL9n7gcDQfr VWCQ== 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=QAWQEoFARIkG4dOz9CjfoMlxDtMdgyCbNtsv05T+MNk=; b=Rs8IPHJPK26fuaAspUc2YAUMBknvlBBIa631Sh7FaVe8QA3Y0XJdTQzPsh22/ok4+H sx1JifzHKsO8N5c7dSjGOrCqeFm/TblohSUO7PpLHBFo2QakOF/xJB2jDglykeEmim9M hgfu+ODQgY+ri0ysjOUZJU9VkvYnXDdFA2/xWScpzv32JeQOU2DCSqkQyoCv1a06uBgh xtUQxDXVTFlTtjqH2gdaa6Q2cypgFhLJ+GrMehgSW5eiOpN33ngulP6hEttRcn+aKbkN xe5+mAzyuBF5wDc9VGe3xPbLehPHgow+1dpPNSftRwUA9XYbiij0gzNNVt6jdz0EcViP Kl5A== X-Gm-Message-State: APt69E3orrbUjFavkeIX9USYTxxk87U/T37tNRhfr7IoWi3oftkIrysF RIN0zMJuZx4GMAaDZ7RIpjI= X-Received: by 2002:a2e:9d5:: with SMTP id 204-v6mr2189640ljj.40.1528873680613; Wed, 13 Jun 2018 00:08:00 -0700 (PDT) Received: from [10.17.182.9] (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id v25-v6sm407244ljh.57.2018.06.13.00.07.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 00:07:59 -0700 (PDT) Subject: Re: [PATCH v3 4/9] xen/grant-table: Allow allocating buffers suitable for DMA 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: <20180612134200.17456-1-andr2000@gmail.com> <20180612134200.17456-5-andr2000@gmail.com> <4ab26c9a-155a-cd04-fbf6-c38c6429959b@oracle.com> From: Oleksandr Andrushchenko Message-ID: Date: Wed, 13 Jun 2018 10:07:58 +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: <4ab26c9a-155a-cd04-fbf6-c38c6429959b@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 06/13/2018 04:12 AM, Boris Ostrovsky wrote: > > > On 06/12/2018 09:41 AM, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> Extend grant table module API to allow allocating buffers that can >> be used for DMA operations and mapping foreign grant references >> on top of those. >> The resulting buffer is similar to the one allocated by the balloon >> driver in terms that proper memory reservation is made >> ({increase|decrease}_reservation and VA mappings updated if needed). >> This is useful for sharing foreign buffers with HW drivers which >> cannot work with scattered buffers provided by the balloon driver, >> but require DMAable memory instead. >> >> Signed-off-by: Oleksandr Andrushchenko >> > > Reviewed-by: Boris Ostrovsky > > with a small nit below > > >> --- >>   drivers/xen/Kconfig       | 13 ++++++ >>   drivers/xen/grant-table.c | 97 +++++++++++++++++++++++++++++++++++++++ >>   include/xen/grant_table.h | 18 ++++++++ >>   3 files changed, 128 insertions(+) >> >> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig >> index e5d0c28372ea..39536ddfbce4 100644 >> --- a/drivers/xen/Kconfig >> +++ b/drivers/xen/Kconfig >> @@ -161,6 +161,19 @@ config XEN_GRANT_DEV_ALLOC >>         to other domains. This can be used to implement frontend drivers >>         or as part of an inter-domain shared memory channel. >>   +config XEN_GRANT_DMA_ALLOC >> +    bool "Allow allocating DMA capable buffers with grant reference >> module" >> +    depends on XEN && HAS_DMA >> +    help >> +      Extends grant table module API to allow allocating DMA capable >> +      buffers and mapping foreign grant references on top of it. >> +      The resulting buffer is similar to one allocated by the balloon >> +      driver in terms that proper memory reservation is made >> +      ({increase|decrease}_reservation and VA mappings updated if >> needed). > > I think you should drop the word "terms" and say "is made *by*" and > "VA mappings *are* updated" > > And similar change in the commit message. > Will, change, thank you > -boris >