From: "Jan Beulich" Subject: Re: [PATCH] x86/arm/mm: use gfn instead of pfn in p2m_get_mem_access/p2m_set_mem_access Date: Tue, 26 May 2015 15:23:57 +0100 Message-ID: <55649E1D020000780007DF5F@mail.emea.novell.com> References: <1432647137-3515-1-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432647137-3515-1-git-send-email-vkuznets@redhat.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: Vitaly Kuznetsov Cc: Keir Fraser , Ian Campbell , Andrew Cooper , Tim Deegan , xen-devel@lists.xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org >>> On 26.05.15 at 15:32, wrote: > --- a/xen/arch/arm/p2m.c > +++ b/xen/arch/arm/p2m.c > @@ -1709,9 +1709,9 @@ bool_t p2m_mem_access_check(paddr_t gpa, vaddr_t gla, > const struct npfec npfec) > > /* > * Set access type for a region of pfns. > - * If start_pfn == -1ul, sets the default access type. > + * If start_gfn == -1ul, sets the default access type. > */ > -long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr, > +long p2m_set_mem_access(struct domain *d, unsigned long start_gfn, uint32_t nr, > uint32_t start, uint32_t mask, xenmem_access_t access) > { > struct p2m_domain *p2m = p2m_get_hostp2m(d); > @@ -1752,14 +1752,15 @@ long p2m_set_mem_access(struct domain *d, unsigned long pfn, uint32_t nr, > p2m->mem_access_enabled = true; > > /* If request to set default access. */ > - if ( pfn == ~0ul ) > + if ( start_gfn == ~0ul ) > { > p2m->default_access = a; > return 0; > } > > rc = apply_p2m_changes(d, MEMACCESS, > - pfn_to_paddr(pfn+start), pfn_to_paddr(pfn+nr), > + pfn_to_paddr(start_gfn + start), Particularly due to this expression I'm not really happy about the start_ prefix that you're adding here, but I'll let the maintainers of the respective pieces of code decide if they're happy with it. Jan