From: Stefano Stabellini Subject: Re: [PATCH v8 0/8] xen/arm: introduce GNTTABOP_cache_flush Date: Mon, 20 Oct 2014 11:36:01 +0100 Message-ID: References: <5444FF730200007800040308@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XgAM9-0006xv-8f for xen-devel@lists.xenproject.org; Mon, 20 Oct 2014 10:38:29 +0000 In-Reply-To: <5444FF730200007800040308@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Julien Grall , xen-devel , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, 20 Oct 2014, Jan Beulich wrote: > >>> On 20.10.14 at 11:47, wrote: > > Hi all, > > this patch series introduces a new hypercall to perform cache > > maintenance operations on behalf of the guest. It is useful for dom0 to > > be able to cache flush pages involved in a dma operation with > > non-coherent devices. > > > > It also removes XENFEAT_grant_map_identity as the feature is no longer > > necessary: it was used to achieve the same goal but the guest can now > > use the hypercall instead. Keeping the flag would also have a > > significant performance impact as a new p2m mapping gets created and > > then destroyed for every grant that is mapped and unmapped in dom0. > > > > > > Changes in v8: > > - remove unused #include; > > - set max_nr_grant_frames as __initdata; > > - set max_grant_frames and max_maptrack_frames as __read_mostly; > > - respent coding style for comments; > > - remove MAX_MAPTRACK_TO_GRANTS_RATIO; > > - avoid security issues, use two separate opaque variables to store the > > input argument and the output argument; > > Security issues? The user could have passed in an opaque value for a gnttabop that doesn't use it, causing Xen to keep looping over the continuation. I fixed it by using two different variable to save the opaque input and output.