All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shanker Donthineni <shankerd@codeaurora.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	xen-devel@lists.xensource.com
Cc: Philip Elcan <pelcan@codeaurora.org>,
	Shanker Donthineni <shankerd@codeaurora.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Vikram Sethi <vikrams@codeaurora.org>
Subject: [PATCH] xen/arm64: Fix incorrect memory region size in TCR2_EL2
Date: Thu, 10 Mar 2016 15:28:13 -0600	[thread overview]
Message-ID: <1457645293-4625-1-git-send-email-shankerd@codeaurora.org> (raw)

The maximum and minimum values for T0SZ depend on level of
translation as per AArch64 Virtual Memory System Architecture.
The current code sets T0SZ to zero in TCR2_EL2 which is not
valid and also might see unexpected behavior on some CPUs.

This patch sets T0SZ to (64-48)bits since XEN uses all 4 levels
to cover 48bit (256TB) virtual address space.

Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
---
 xen/arch/arm/arm64/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 19fa2bb..28ee404 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -343,7 +343,7 @@ skip_bss:
          * PT walks use Inner-Shareable accesses,
          * PT walks are write-back, write-allocate in both cache levels,
          * Full 64-bit address space goes through this table. */
-        ldr   x0, =(TCR_RES1|TCR_SH0_IS|TCR_ORGN0_WBWA|TCR_IRGN0_WBWA|TCR_T0SZ(0))
+        ldr   x0, =(TCR_RES1|TCR_SH0_IS|TCR_ORGN0_WBWA|TCR_IRGN0_WBWA|TCR_T0SZ(64-48))
         /* ID_AA64MMFR0_EL1[3:0] (PARange) corresponds to TCR_EL2[18:16] (PS) */
         mrs   x1, ID_AA64MMFR0_EL1
         bfi   x0, x1, #16, #3
-- 
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
a Linux Foundation Collaborative Project


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2016-03-10 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10 21:28 Shanker Donthineni [this message]
2016-03-12 13:13 ` [PATCH] xen/arm64: Fix incorrect memory region size in TCR2_EL2 Julien Grall
2016-03-14 14:37   ` Shanker Donthineni
2016-03-14 14:58     ` Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457645293-4625-1-git-send-email-shankerd@codeaurora.org \
    --to=shankerd@codeaurora.org \
    --cc=ian.campbell@citrix.com \
    --cc=pelcan@codeaurora.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=vikrams@codeaurora.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.