From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH] xen/arm: Implement domain_get_maximum_gpfn Date: Wed, 02 Jul 2014 10:19:57 +0100 Message-ID: <53B3CEBD.6090606@linaro.org> References: <1404226666-7949-1-git-send-email-julien.grall@linaro.org> <1404292348.17692.0.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1X2Ght-0001uj-5B for xen-devel@lists.xenproject.org; Wed, 02 Jul 2014 09:20:01 +0000 Received: by mail-wi0-f177.google.com with SMTP id r20so90959wiv.10 for ; Wed, 02 Jul 2014 02:19:59 -0700 (PDT) In-Reply-To: <1404292348.17692.0.camel@kazak.uk.xensource.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 Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 02/07/14 10:12, Ian Campbell wrote: > On Tue, 2014-07-01 at 15:57 +0100, Julien Grall wrote: >> The function domain_get_maximum_gpfn is returning the maximum gpfn ever >> mapped in the guest. We can use d->arch.p2m.max_mapped_gfn for this purpose. > > What is using the result of this hypercall? The result is at least used by xc_dom_gnttab_hvm_seed, to get a scratch GFN to initialize grant table. IHMO this is buggy on ARM (and x86?), because we could have map everything up to the end of the address space (currently 40 bits). I plan to rework a bit this code. Without this patch, xc_dom_gnttab_hvm_seed will use by mistake the pfn 0 (0xffffffff + 1). Regards, -- Julien Grall