From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH for-4.6] tools/libxc: linux: Don't use getpagesize() when unmapping the grants Date: Wed, 12 Aug 2015 11:07:47 +0100 Message-ID: <55CB1AF3.20406@citrix.com> References: <1438973635-16517-1-git-send-email-julien.grall@citrix.com> <20150807214509.GA10919@zion.uk.xensource.com> <1439297334.9747.238.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZPSws-0003Jc-Ch for xen-devel@lists.xenproject.org; Wed, 12 Aug 2015 10:07:54 +0000 In-Reply-To: <1439297334.9747.238.camel@citrix.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: Ian Campbell , Wei Liu Cc: xen-devel@lists.xenproject.org, stefano.stabellini@citrix.com, Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Hi Ian, On 11/08/2015 13:48, Ian Campbell wrote: > On Fri, 2015-08-07 at 22:45 +0100, Wei Liu wrote: >> On Fri, Aug 07, 2015 at 07:53:55PM +0100, Julien Grall wrote: >>> The grants are based on the Xen granularity (i.e 4KB). While the >>> function >>> to map grants for Linux (linux_gnttab_grant_map) is using the correct >>> size (XC_PAGE_SIZE), the unmap one (linux_gnttab_munmap) is using >>> getpagesize(). >>> >>> On domain using a page granularity different than Xen (this is the case >>> for AARCH64 guest using 64KB page), the unmap will be called with the >>> wrong size. >>> >>> Signed-off-by: Julien Grall >>> >>> --- >>> Cc: Ian Jackson >>> Cc: Stefano Stabellini >>> Cc: Ian Campbell >>> Cc: Wei Liu >>> >> >> Acked-by: Wei Liu > > Acked-by: Ian Campbell > >> I think this is a bug fix and should be applied for 4.6. > > Agreed. > > WRT to backports for 4.5 I'd appreciate being given a full list of required > fixes once everything is in place and working for 4.6/devbranch rather than > my tracking it piecemeal. I have a working branch with Xen tools running on 64KB, and I didn't expected to find another problem. I spotted this one by reading the code and see inconsistency between the mmap and the mmunmap. And I'm sure I haven't spot all the things because testing every configuration to see if 64KB guest are working is a huge work. Anyway, I will send a mail with all the patch to backport. Regards, -- Julien Grall