From: Joel Schopp <joel.schopp@amd.com>
To: <kvmarm@lists.cs.columbia.edu>,
<linux-arm-kernel@lists.infradead.org>, <kvm@vger.kernel.org>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Subject: [PATCH] arm64: fix VTTBR_BADDR_MASK
Date: Wed, 9 Jul 2014 11:17:04 -0500 [thread overview]
Message-ID: <20140709161704.9623.92358.stgit@joelaarch64.amd.com> (raw)
The current calculation for VTTBR_BADDR_MASK masks only 39 bits and not
all 40 bits. That last bit is important as some systems allocate
from near the top of the available address space.
This patch is necessary to run KVM on an aarch64 SOC I have been testing.
Signed-off-by: Joel Schopp <joel.schopp@amd.com>
---
arch/arm64/include/asm/kvm_arm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h
index 3d69030..b39e93f 100644
--- a/arch/arm64/include/asm/kvm_arm.h
+++ b/arch/arm64/include/asm/kvm_arm.h
@@ -148,7 +148,7 @@
#endif
#define VTTBR_BADDR_SHIFT (VTTBR_X - 1)
-#define VTTBR_BADDR_MASK (((1LLU << (40 - VTTBR_X)) - 1) << VTTBR_BADDR_SHIFT)
+#define VTTBR_BADDR_MASK (0xffffffffffLLU) /* bits 0-39 */
#define VTTBR_VMID_SHIFT (48LLU)
#define VTTBR_VMID_MASK (0xffLLU << VTTBR_VMID_SHIFT)
next reply other threads:[~2014-07-09 16:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 16:17 Joel Schopp [this message]
2014-07-10 20:25 ` [PATCH] arm64: fix VTTBR_BADDR_MASK Christoffer Dall
2014-07-10 21:02 ` Joel Schopp
2014-07-10 21:51 ` Joel Schopp
2014-07-11 10:38 ` Christoffer Dall
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=20140709161704.9623.92358.stgit@joelaarch64.amd.com \
--to=joel.schopp@amd.com \
--cc=christoffer.dall@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox