From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2 5/6] gnttab: fix/adjust gnttab_transfer() Date: Mon, 15 Jun 2015 14:37:25 +0100 Message-ID: <557ED515.6060004@citrix.com> References: <557EDDDD0200007800084C94@mail.emea.novell.com> <557EE0F50200007800084CE1@mail.emea.novell.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 1Z4UZu-0000zK-JE for xen-devel@lists.xenproject.org; Mon, 15 Jun 2015 13:37:30 +0000 In-Reply-To: <557EE0F50200007800084CE1@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 , xen-devel Cc: Ian Campbell , Ian Jackson , Keir Fraser , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 15/06/15 13:28, Jan Beulich wrote: > - don't update shared entry's frame number for translated domains (as > MFNs shouldn't be exposed to such guests) > - for v1 grant table format, force copying of the page also when the > intended MFN doesn't fit in 32 bits (and the domain isn't translated) > - fix an apparent off-by-one error (it's unclear to me why commit > 5cc77f9098 ("32-on-64: Fix domain address-size clamping, implement") > uses BITS_PER_LONG-1 here, while using BITS_PER_LONG in the two other > invocations of domain_clamp_alloc_bitsize()) > - adjust comments accompanying the shared entry's frame field > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper , although... > > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -1708,7 +1708,8 @@ gnttab_transfer( > } > > max_bitsize = domain_clamp_alloc_bitsize( > - e, BITS_PER_LONG+PAGE_SHIFT-1); > + e, e->grant_table->gt_version > 1 || paging_mode_translate(e) I would recommend two pairs of brackets here for clarity. ~Andrew