diff options
Diffstat (limited to 'arch/powerpc/kvm/e500_tlb.c')
-rw-r--r-- | arch/powerpc/kvm/e500_tlb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index 0e773fc2d5e4..a2048ac095ab 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c | |||
@@ -269,7 +269,7 @@ static inline void kvmppc_e500_deliver_tlb_miss(struct kvm_vcpu *vcpu, | |||
269 | tlbsel = (vcpu_e500->mas4 >> 28) & 0x1; | 269 | tlbsel = (vcpu_e500->mas4 >> 28) & 0x1; |
270 | victim = (tlbsel == 0) ? tlb0_get_next_victim(vcpu_e500) : 0; | 270 | victim = (tlbsel == 0) ? tlb0_get_next_victim(vcpu_e500) : 0; |
271 | pidsel = (vcpu_e500->mas4 >> 16) & 0xf; | 271 | pidsel = (vcpu_e500->mas4 >> 16) & 0xf; |
272 | tsized = (vcpu_e500->mas4 >> 8) & 0xf; | 272 | tsized = (vcpu_e500->mas4 >> 7) & 0x1f; |
273 | 273 | ||
274 | vcpu_e500->mas0 = MAS0_TLBSEL(tlbsel) | MAS0_ESEL(victim) | 274 | vcpu_e500->mas0 = MAS0_TLBSEL(tlbsel) | MAS0_ESEL(victim) |
275 | | MAS0_NV(vcpu_e500->guest_tlb_nv[tlbsel]); | 275 | | MAS0_NV(vcpu_e500->guest_tlb_nv[tlbsel]); |
@@ -309,7 +309,7 @@ static inline void kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
309 | vcpu_e500->shadow_pages[tlbsel][esel] = new_page; | 309 | vcpu_e500->shadow_pages[tlbsel][esel] = new_page; |
310 | 310 | ||
311 | /* Force TS=1 IPROT=0 TSIZE=4KB for all guest mappings. */ | 311 | /* Force TS=1 IPROT=0 TSIZE=4KB for all guest mappings. */ |
312 | stlbe->mas1 = MAS1_TSIZE(BOOKE_PAGESZ_4K) | 312 | stlbe->mas1 = MAS1_TSIZE(BOOK3E_PAGESZ_4K) |
313 | | MAS1_TID(get_tlb_tid(gtlbe)) | MAS1_TS | MAS1_VALID; | 313 | | MAS1_TID(get_tlb_tid(gtlbe)) | MAS1_TS | MAS1_VALID; |
314 | stlbe->mas2 = (gvaddr & MAS2_EPN) | 314 | stlbe->mas2 = (gvaddr & MAS2_EPN) |
315 | | e500_shadow_mas2_attrib(gtlbe->mas2, | 315 | | e500_shadow_mas2_attrib(gtlbe->mas2, |
@@ -545,7 +545,7 @@ int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu) | |||
545 | case 0: | 545 | case 0: |
546 | /* TLB0 */ | 546 | /* TLB0 */ |
547 | gtlbe->mas1 &= ~MAS1_TSIZE(~0); | 547 | gtlbe->mas1 &= ~MAS1_TSIZE(~0); |
548 | gtlbe->mas1 |= MAS1_TSIZE(BOOKE_PAGESZ_4K); | 548 | gtlbe->mas1 |= MAS1_TSIZE(BOOK3E_PAGESZ_4K); |
549 | 549 | ||
550 | stlbsel = 0; | 550 | stlbsel = 0; |
551 | sesel = kvmppc_e500_stlbe_map(vcpu_e500, 0, esel); | 551 | sesel = kvmppc_e500_stlbe_map(vcpu_e500, 0, esel); |
@@ -679,14 +679,14 @@ void kvmppc_e500_tlb_setup(struct kvmppc_vcpu_e500 *vcpu_e500) | |||
679 | 679 | ||
680 | /* Insert large initial mapping for guest. */ | 680 | /* Insert large initial mapping for guest. */ |
681 | tlbe = &vcpu_e500->guest_tlb[1][0]; | 681 | tlbe = &vcpu_e500->guest_tlb[1][0]; |
682 | tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_256M); | 682 | tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_256M); |
683 | tlbe->mas2 = 0; | 683 | tlbe->mas2 = 0; |
684 | tlbe->mas3 = E500_TLB_SUPER_PERM_MASK; | 684 | tlbe->mas3 = E500_TLB_SUPER_PERM_MASK; |
685 | tlbe->mas7 = 0; | 685 | tlbe->mas7 = 0; |
686 | 686 | ||
687 | /* 4K map for serial output. Used by kernel wrapper. */ | 687 | /* 4K map for serial output. Used by kernel wrapper. */ |
688 | tlbe = &vcpu_e500->guest_tlb[1][1]; | 688 | tlbe = &vcpu_e500->guest_tlb[1][1]; |
689 | tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_4K); | 689 | tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_4K); |
690 | tlbe->mas2 = (0xe0004500 & 0xFFFFF000) | MAS2_I | MAS2_G; | 690 | tlbe->mas2 = (0xe0004500 & 0xFFFFF000) | MAS2_I | MAS2_G; |
691 | tlbe->mas3 = (0xe0004500 & 0xFFFFF000) | E500_TLB_SUPER_PERM_MASK; | 691 | tlbe->mas3 = (0xe0004500 & 0xFFFFF000) | E500_TLB_SUPER_PERM_MASK; |
692 | tlbe->mas7 = 0; | 692 | tlbe->mas7 = 0; |