All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: fix VTTBR_BADDR_MASK
@ 2014-07-09 16:17 ` Joel Schopp
  0 siblings, 0 replies; 10+ messages in thread
From: Joel Schopp @ 2014-07-09 16:17 UTC (permalink / raw)
  To: linux-arm-kernel

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)
 

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-11 10:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09 16:17 [PATCH] arm64: fix VTTBR_BADDR_MASK Joel Schopp
2014-07-09 16:17 ` Joel Schopp
2014-07-10 20:25 ` Christoffer Dall
2014-07-10 20:25   ` Christoffer Dall
2014-07-10 21:02   ` Joel Schopp
2014-07-10 21:02     ` Joel Schopp
2014-07-10 21:51     ` Joel Schopp
2014-07-10 21:51       ` Joel Schopp
2014-07-11 10:38       ` Christoffer Dall
2014-07-11 10:38         ` Christoffer Dall

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.