From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH V14 2/7] xen/arm: Implement domain_get_maximum_gpfn Date: Wed, 08 Apr 2015 14:23:38 +0100 Message-ID: <55252BDA.6000209@gmail.com> References: <1427407531-31694-1-git-send-email-tklengyel@sec.in.tum.de> <1427407531-31694-3-git-send-email-tklengyel@sec.in.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427407531-31694-3-git-send-email-tklengyel@sec.in.tum.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tamas K Lengyel , xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, jbeulich@suse.com, keir@xen.org List-Id: xen-devel@lists.xenproject.org Hi Tamas, On 26/03/15 22:05, Tamas K Lengyel wrote: > From: Julien Grall > > 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. > > We use this in xenaccess as to avoid the user attempting to set page > permissions on pages which don't exist for the domain, as a non-arch specific > sanity check. FWIW, xc_domain_maximum_gpfn is buggy for ARM64 as a PFN can be encode with up to 36 bits which doesn't fit on the return code (an int is used). Although, I don't see any call to xc_domain_maximum_gpfn in memaccess (tools/tests/memaccess). So is this patch still useful? Regards, -- Julien Grall