Commit e9666ea1 authored by Mihai Caraman's avatar Mihai Caraman Committed by Alexander Graf

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: default avatarMihai Caraman <mihai.caraman@freescale.com>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent 9e2fa646
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#define MAS1_TSIZE_SHIFT 7 #define MAS1_TSIZE_SHIFT 7
#define MAS1_TSIZE(x) (((x) << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK) #define MAS1_TSIZE(x) (((x) << MAS1_TSIZE_SHIFT) & MAS1_TSIZE_MASK)
#define MAS2_EPN 0xFFFFF000 #define MAS2_EPN (~0xFFFUL)
#define MAS2_X0 0x00000040 #define MAS2_X0 0x00000040
#define MAS2_X1 0x00000020 #define MAS2_X1 0x00000020
#define MAS2_W 0x00000010 #define MAS2_W 0x00000010
......
...@@ -154,7 +154,7 @@ get_tlb_size(const struct kvm_book3e_206_tlb_entry *tlbe) ...@@ -154,7 +154,7 @@ get_tlb_size(const struct kvm_book3e_206_tlb_entry *tlbe)
static inline gva_t get_tlb_eaddr(const struct kvm_book3e_206_tlb_entry *tlbe) static inline gva_t get_tlb_eaddr(const struct kvm_book3e_206_tlb_entry *tlbe)
{ {
return tlbe->mas2 & 0xfffff000; return tlbe->mas2 & MAS2_EPN;
} }
static inline u64 get_tlb_bytes(const struct kvm_book3e_206_tlb_entry *tlbe) static inline u64 get_tlb_bytes(const struct kvm_book3e_206_tlb_entry *tlbe)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment