diff options
author | Mihai Caraman <mihai.caraman@freescale.com> | 2012-10-11 02:13:25 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-12-05 19:34:15 -0500 |
commit | e9666ea1b3d11509b76f8ff5b9776d8d30709b19 (patch) | |
tree | 67db843e94b9c6f72ecbc4807692560e72fcee75 /arch | |
parent | 9e2fa646936160eca525bcb80c2cce05faa9b208 (diff) |
KVM: PPC: booke: Extend MAS2 EPN mask for 64-bit
Extend MAS2 EPN mask to retain most significant bits on 64-bit hosts.
Use this mask in tlb effective address accessor.
Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/mmu-book3e.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kvm/e500.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/mmu-book3e.h b/arch/powerpc/include/asm/mmu-book3e.h index eeabcdbc30f..99d43e0c1e4 100644 --- a/arch/powerpc/include/asm/mmu-book3e.h +++ b/arch/powerpc/include/asm/mmu-book3e.h | |||
@@ -59,7 +59,7 @@ | |||
59 | #define MAS1_TSIZE_SHIFT 7 | 59 | #define MAS1_TSIZE_SHIFT 7 |
60 | #define MAS1_TSIZE(x) (((x) << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK) | 60 | #define MAS1_TSIZE(x) (((x) << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK) |
61 | 61 | ||
62 | #define MAS2_EPN 0xFFFFF000 | 62 | #define MAS2_EPN (~0xFFFUL) |
63 | #define MAS2_X0 0x00000040 | 63 | #define MAS2_X0 0x00000040 |
64 | #define MAS2_X1 0x00000020 | 64 | #define MAS2_X1 0x00000020 |
65 | #define MAS2_W 0x00000010 | 65 | #define MAS2_W 0x00000010 |
diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h index 32e98a72b0a..c70d37ed770 100644 --- a/arch/powerpc/kvm/e500.h +++ b/arch/powerpc/kvm/e500.h | |||
@@ -154,7 +154,7 @@ get_tlb_size(const struct kvm_book3e_206_tlb_entry *tlbe) | |||
154 | 154 | ||
155 | static inline gva_t get_tlb_eaddr(const struct kvm_book3e_206_tlb_entry *tlbe) | 155 | static inline gva_t get_tlb_eaddr(const struct kvm_book3e_206_tlb_entry *tlbe) |
156 | { | 156 | { |
157 | return tlbe->mas2 & 0xfffff000; | 157 | return tlbe->mas2 & MAS2_EPN; |
158 | } | 158 | } |
159 | 159 | ||
160 | static inline u64 get_tlb_bytes(const struct kvm_book3e_206_tlb_entry *tlbe) | 160 | static inline u64 get_tlb_bytes(const struct kvm_book3e_206_tlb_entry *tlbe) |