From: "Jan Beulich" Subject: Re: [PATCH v9 6/8] xen/arm: introduce GNTTABOP_cache_flush Date: Tue, 21 Oct 2014 10:22:54 +0100 Message-ID: <5446420E020000780004096F@mail.emea.novell.com> References: <1413824297-2805-6-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XgVec-00034J-5l for xen-devel@lists.xenproject.org; Tue, 21 Oct 2014 09:22:58 +0000 In-Reply-To: <1413824297-2805-6-git-send-email-stefano.stabellini@eu.citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel , Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 20.10.14 at 18:58, wrote: > @@ -490,6 +495,42 @@ static int _set_status(unsigned gt_version, > return _set_status_v2(domid, readonly, mapflag, shah, act, status); > } > > +static int grant_map_exists(const struct domain *ld, > + struct grant_table *rgt, > + unsigned long mfn, > + grant_ref_t *ref_count) > +{ > + const struct active_grant_entry *act; > + grant_ref_t ref, max_iter; > + > + ASSERT(spin_is_locked(&rgt->lock)); > + > + max_iter = min(*ref_count + (1 << GNTTABOP_CONTINUATION_ARG_SHIFT), nr_grant_entries(rgt)); Long line. > @@ -2617,17 +2761,34 @@ do_grant_table_op( > } > break; > } > + case GNTTABOP_cache_flush: > + { > + grant_ref_t ref_count = opaque_in; I can't see the need for this variable. > --- a/xen/include/public/grant_table.h > +++ b/xen/include/public/grant_table.h > @@ -309,6 +309,8 @@ typedef uint16_t grant_status_t; > #define GNTTABOP_get_status_frames 9 > #define GNTTABOP_get_version 10 > #define GNTTABOP_swap_grant_ref 11 > +#define GNTTABOP_cache_flush 12 > +/* max GNTTABOP is 4095 */ This is an implementation detail, i.e. such a comment doesn't belong in the public header. Jan