From patchwork Thu Dec 5 15:42:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 22076 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 39A96202E0 for ; Thu, 5 Dec 2013 15:42:36 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id e14sf56105964iej.4 for ; Thu, 05 Dec 2013 07:42:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=a4jHOHasMJ5rvca+Q5cPX2uEQoqlEYXgtHjnaCfuhyE=; b=PiS3fXQPghxcId0/dg2lm6zVkZF6pUaOiRgRqiNqCS0UbD/mAf2ldANbqllNWbYZS6 OnSOWST26bd9e+xxQfGfdEkliooN9UEE3CPHz/Mj6gSLURms2YEBx91l4S1lhCGLuPPf Q2DRHD82mOf9EVK+9iQL9PYKM5GXic3yuCeXBY4RKR+CzWzrkYqp3gHV6TeZfEXte2zf eppYNZ9zFdCXYCetBEm3XYYCAjhMCzKwyLImKQqe02UCzwOG+GyvkWxe68hYMpjhwkLr 959/zZY1NVAdLaAL9/8TTTam+Tb5X2i+E2GLPemoCjfRK/geJgYLreZtqlCrSJZOo/SN wmzg== X-Gm-Message-State: ALoCoQnXLpUkvB9pcJnK6m+XAo+8IBVpmtqs48Sb+WjjNHGBbzeeqTqg8sTlEoWxmGW5jZ9Xk2va X-Received: by 10.182.22.73 with SMTP id b9mr27030607obf.17.1386258155764; Thu, 05 Dec 2013 07:42:35 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.82 with SMTP id j18ls880893qen.49.gmail; Thu, 05 Dec 2013 07:42:35 -0800 (PST) X-Received: by 10.52.230.35 with SMTP id sv3mr11945847vdc.27.1386258155652; Thu, 05 Dec 2013 07:42:35 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id rw7si25931596vcb.104.2013.12.05.07.42.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:42:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jw12so14137555veb.3 for ; Thu, 05 Dec 2013 07:42:35 -0800 (PST) X-Received: by 10.220.199.5 with SMTP id eq5mr64776751vcb.16.1386258155501; Thu, 05 Dec 2013 07:42:35 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp24845vcz; Thu, 5 Dec 2013 07:42:35 -0800 (PST) X-Received: by 10.181.5.40 with SMTP id cj8mr12638775wid.18.1386258154791; Thu, 05 Dec 2013 07:42:34 -0800 (PST) Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) by mx.google.com with ESMTPS id z3si783295wia.7.2013.12.05.07.42.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:42:34 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.180 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.180; Received: by mail-we0-f180.google.com with SMTP id t61so10998265wes.39 for ; Thu, 05 Dec 2013 07:42:34 -0800 (PST) X-Received: by 10.180.210.134 with SMTP id mu6mr12768693wic.37.1386258154378; Thu, 05 Dec 2013 07:42:34 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id w20sm7350575wia.5.2013.12.05.07.42.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Dec 2013 07:42:33 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: patches@linaro.org, ian.campbell@citrix.com, time@xen.org, stefano.stabellini@citrix.com, 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> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1386258131-755-1-git-send-email-julien.grall@linaro.org> References: <1386258131-755-1-git-send-email-julien.grall@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;