From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [PATCH 6/8] xen/arm: Retrieve p2m type in get_page_from_gfn Date: Thu, 5 Dec 2013 15:42:09 +0000 Message-ID: <1386258131-755-7-git-send-email-julien.grall@linaro.org> References: <1386258131-755-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vob4W-0001uf-17 for xen-devel@lists.xenproject.org; Thu, 05 Dec 2013 15:42:36 +0000 Received: by mail-we0-f177.google.com with SMTP id u56so1009367wes.36 for ; Thu, 05 Dec 2013 07:42:34 -0800 (PST) In-Reply-To: <1386258131-755-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Julien Grall , stefano.stabellini@citrix.com, ian.campbell@citrix.com, time@xen.org, patches@linaro.org List-Id: xen-devel@lists.xenproject.org Signed-off-by: Julien Grall --- xen/include/asm-arm/p2m.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 3de69c4..54d1dab 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -105,9 +105,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); - - ASSERT(t == NULL); + paddr_t maddr = p2m_get_entry(d, pfn_to_paddr(gfn), t); + unsigned long mfn = maddr >> PAGE_SHIFT; if (!mfn_valid(mfn)) return NULL; -- 1.7.10.4