From patchwork Mon Mar 17 17:36:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 26401 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 94046202FA for ; Mon, 17 Mar 2014 17:39:21 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id n16sf24154844oag.5 for ; Mon, 17 Mar 2014 10:39:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:message-id:from:to:date:in-reply-to :references:organization:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=wV6ayUiseAgksDezokTEahsnPxEcN4q/ksGUvhXzCVU=; b=Fx+ecmq4jMSvcBFp7VbVOto7/TZ6cse2/gGKqZGKKwtvhGXaQnbb0YOHO4t68u8Al7 tcvJMsk4rolI46qYOmKDu8ltiLmJR2quLjPdulr6XeTsu7/NodXqBwK2TOTYjdIoTHRL YanOioRiyXT2T4l7dPtmJwFAKx+dh6EGvPJgg0+YpITQuAEUklhg1FCT/cggeYrtbcKS DS5w9f4z3xzuPshf2hwOq2D+bhDBsD8qRmNDrzd7xmXINoUYsV1z8i8SzF1j0rOl8njc sB0oM2QYG2pINu2E8cpVOJD/42JUTi+13KCWcS8TscZArIBiO6AjVPw5SOdLbZVd5kpl TBLw== X-Gm-Message-State: ALoCoQmzu8xSVc3IzpPcFC+F/0B73OZ6MKveDxNjV3ZHZZbqM3Wa0xw80nOAzBnP9DwXb3FhFdXP X-Received: by 10.43.101.202 with SMTP id db10mr9120651icc.9.1395077961102; Mon, 17 Mar 2014 10:39:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.38 with SMTP id n35ls1746317qga.68.gmail; Mon, 17 Mar 2014 10:39:20 -0700 (PDT) X-Received: by 10.52.69.146 with SMTP id e18mr17362141vdu.15.1395077960905; Mon, 17 Mar 2014 10:39:20 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id ku3si2921475veb.184.2014.03.17.10.39.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 10:39:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if17so6062674vcb.36 for ; Mon, 17 Mar 2014 10:39:20 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr20879780vcb.0.1395077960828; Mon, 17 Mar 2014 10:39:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp143734vck; Mon, 17 Mar 2014 10:39:20 -0700 (PDT) X-Received: by 10.140.42.138 with SMTP id c10mr28663923qga.24.1395077957703; Mon, 17 Mar 2014 10:39:17 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id b107si5331154qgf.146.2014.03.17.10.39.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 10:39:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPbTT-0006yM-3x; Mon, 17 Mar 2014 17:37:19 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WPbTC-0006y0-0b for xen-devel@lists.xen.org; Mon, 17 Mar 2014 17:37:14 +0000 Received: from [85.158.137.68:35189] by server-13.bemta-3.messagelabs.com id 8D/9A-18692-DB237235; Mon, 17 Mar 2014 17:37:01 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1395077819!1165264!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28971 invoked from network); 17 Mar 2014 17:37:00 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 17 Mar 2014 17:37:00 -0000 X-IronPort-AV: E=Sophos;i="4.97,671,1389744000"; d="scan'208";a="112196331" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 17 Mar 2014 17:36:59 +0000 Received: from [10.80.2.80] (10.80.2.80) by FTLPEX01CL03.citrite.net (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Mon, 17 Mar 2014 13:36:58 -0400 Message-ID: <1395077816.18221.53.camel@kazak.uk.xensource.com> From: Ian Campbell To: Julien Grall Date: Mon, 17 Mar 2014 17:36:56 +0000 In-Reply-To: <532711F7.1070403@linaro.org> References: <1395067981.18221.35.camel@kazak.uk.xensource.com> <1395068010-23344-1-git-send-email-ian.campbell@citrix.com> <53270F7F.9080606@linaro.org> <1395069109.18221.39.camel@kazak.uk.xensource.com> <532711F7.1070403@linaro.org> Organization: Citrix Systems, Inc. X-Mailer: Evolution 3.4.4-3 MIME-Version: 1.0 X-Originating-IP: [10.80.2.80] X-DLP: MIA1 Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org Subject: Re: [Xen-devel] [PATCH=v3 1/8] xen: arm: map memory as inner shareable. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.177 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: On Mon, 2014-03-17 at 15:17 +0000, Julien Grall wrote: > AFAIU, you are also modifying P2M attributes. True. This patch (#9/8) works for me: ---------8<--------------------- >From 573bb9d531e47b50f02767ed363ad3e5df6be2a7 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 17 Mar 2014 17:27:40 +0000 Subject: [PATCH] xen: arm: make stage 2 page tables walks inner-shareable The comment was previously incorrect and indicated that these mappings were unshared (00) when in reality the register was set for outer-shareable (01). Clarify ORGN0/IRGN0 in the comments while at it. Signed-off-by: Ian Campbell Acked-by: Julien Grall --- xen/arch/arm/mm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index e9b3f34..6f1408b 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -378,16 +378,17 @@ void __init arch_init_memory(void) void __cpuinit setup_virt_paging(void) { /* Setup Stage 2 address translation */ - /* SH0=00, ORGN0=IRGN0=01 + /* SH0=11 (Inner-shareable) + * ORGN0=IRGN0=01 (Normal memory, Write-Back Write-Allocate Cacheable) * SL0=01 (Level-1) * ARVv7: T0SZ=(1)1000 = -8 (32-(-8) = 40 bit physical addresses) * ARMv8: T0SZ=01 1000 = 24 (64-24 = 40 bit physical addresses) * PS=010 == 40 bits */ #ifdef CONFIG_ARM_32 - WRITE_SYSREG32(0x80002558, VTCR_EL2); + WRITE_SYSREG32(0x80003558, VTCR_EL2); #else - WRITE_SYSREG32(0x80022558, VTCR_EL2); + WRITE_SYSREG32(0x80023558, VTCR_EL2); #endif isb(); }