From patchwork Mon Dec 9 03:34:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 22153 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6422923FD2 for ; Mon, 9 Dec 2013 03:34:23 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at1sf12148862iec.3 for ; Sun, 08 Dec 2013 19:34:23 -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=ZsJtOi+9GlxnCtuNV24kWS7vJ4WmhGzZqcQXUoiJqQU=; b=RMFcsJfxt8rdQMbyRPAEE0LCrlO7OeertnMqDFzRkyhjmgLyYdrtG6C45xzKY06S2p /i6RsxQuRWq6r6HanLpcIwNF9vLQQo+V79dPdkd2i+nr1IksV++2MqaHYOBTR6uCD0Vr jbsaZmPiHIp9w6wWllbU3TJGaV7GugNqJLLACyMPgJN4dpa5NnJiYdW8Lszx2sNrALsB Opo/IhJb0NVU6wZlzAiGsEpTcx7eWMormp5kn52NXj/ZZnRzww1mzZHP8Zhyt5GBU650 RfgSbhy3MxQg2qU8aUXc13MuU4iDrzkFx/QWQT7ds6G0/JveYur/eRQ3mu1AXRAoEnjf 2RFw== X-Gm-Message-State: ALoCoQnx0M4mCHVmT8CVWtDkxtupTyKUsXVovOMaBLCxkTHS7h+FgBkn7fgoYQ3kmGHv+Ptdq2CZ X-Received: by 10.182.53.165 with SMTP id c5mr5708219obp.0.1386560063048; Sun, 08 Dec 2013 19:34:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.49.10 with SMTP id q10ls1903263qen.0.gmail; Sun, 08 Dec 2013 19:34:22 -0800 (PST) X-Received: by 10.58.50.194 with SMTP id e2mr374123veo.54.1386560062921; Sun, 08 Dec 2013 19:34:22 -0800 (PST) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id ti3si3183819vdc.2.2013.12.08.19.34.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 19:34:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id p5so133053vbn.11 for ; Sun, 08 Dec 2013 19:34:22 -0800 (PST) X-Received: by 10.221.60.134 with SMTP id ws6mr630166vcb.44.1386560062852; Sun, 08 Dec 2013 19:34:22 -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 u4csp75728vcz; Sun, 8 Dec 2013 19:34:22 -0800 (PST) X-Received: by 10.14.218.129 with SMTP id k1mr1322132eep.109.1386560062069; Sun, 08 Dec 2013 19:34:22 -0800 (PST) Received: from mail-ea0-f176.google.com (mail-ea0-f176.google.com [209.85.215.176]) by mx.google.com with ESMTPS id i1si7722866eev.89.2013.12.08.19.34.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 19:34:22 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.176 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.215.176; Received: by mail-ea0-f176.google.com with SMTP id h14so1280182eaj.35 for ; Sun, 08 Dec 2013 19:34:21 -0800 (PST) X-Received: by 10.14.69.200 with SMTP id n48mr11033632eed.54.1386560061537; Sun, 08 Dec 2013 19:34:21 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id g7sm23681234eet.12.2013.12.08.19.34.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Dec 2013 19:34:20 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: patches@linaro.org, ian.campbell@citrix.com, tim@xen.org, stefano.stabellini@citrix.com, Julien Grall Subject: [PATCH v2 06/10] xen/arm: Retrieve p2m type in get_page_from_gfn Date: Mon, 9 Dec 2013 03:34:03 +0000 Message-Id: <1386560047-17500-7-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1386560047-17500-1-git-send-email-julien.grall@linaro.org> References: <1386560047-17500-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.212.52 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 --- 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; if (!mfn_valid(mfn)) return NULL;