From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 06/10] xen/arm: Retrieve p2m type in get_page_from_gfn Date: Mon, 09 Dec 2013 16:50:03 +0000 Message-ID: <52A5F4BB.3010000@linaro.org> References: <1386560047-17500-1-git-send-email-julien.grall@linaro.org> <1386560047-17500-7-git-send-email-julien.grall@linaro.org> <1386605178.7812.40.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vq425-0005zx-7r for xen-devel@lists.xenproject.org; Mon, 09 Dec 2013 16:50:09 +0000 Received: by mail-ee0-f41.google.com with SMTP id t10so1702542eei.14 for ; Mon, 09 Dec 2013 08:50:07 -0800 (PST) In-Reply-To: <1386605178.7812.40.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, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On 12/09/2013 04:06 PM, Ian Campbell wrote: > On Mon, 2013-12-09 at 03:34 +0000, Julien Grall wrote: >> Signed-off-by: Julien Grall >> >> --- >> Changes in v2: >> - Use p2m_lookup as p2m_get_entry was removed >> --- >> xen/include/asm-arm/p2m.h | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h >> index f4bcd7d..b63204d 100644 >> --- a/xen/include/asm-arm/p2m.h >> +++ b/xen/include/asm-arm/p2m.h >> @@ -109,7 +109,8 @@ static inline struct page_info *get_page_from_gfn( >> struct domain *d, unsigned long gfn, p2m_type_t *t, p2m_query_t q) >> { >> struct page_info *page; >> - unsigned long mfn = gmfn_to_mfn(d, gfn); >> + paddr_t maddr = p2m_lookup(d, pfn_to_paddr(gfn), t); >> + unsigned long mfn = maddr >> PAGE_SHIFT; > > I think this resend happened before I replied to the original a second > time, (in <1386583029.13126.13.camel@kazak.uk.xensource.com>) so you > hadn't seen it. Indeed, I will fix it. > TL;DR: INVALID_MADDR >> PAGE_SHIFT != INVALID_MFN on arm64. Does it mean that INVALID_MFN can be a valid mfn on arm64? If so, we have some place in common code where this constant is used (see common/domain.c for instance). -- Julien Grall