diff options
author | Scott Wood <scottwood@freescale.com> | 2011-06-14 19:34:34 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-07-12 06:16:33 -0400 |
commit | 6fc4d1eb911cced6bc103f2b36497397e99e8c43 (patch) | |
tree | d0dc20dd4412525d05e2876e27f06918181d64b2 /arch/powerpc/kvm/e500_tlb.c | |
parent | 4cd35f675ba41a99a477e28a6add4a66833325f2 (diff) |
KVM: PPC: e500: Disable preloading TLB1 in tlb_load().
Since TLB1 loading doesn't check the shadow TLB before allocating another
entry, you can get duplicates.
Once shadow PIDs are enabled in a later patch, we won't need to
invalidate the TLB on every switch, so this optimization won't be
needed anyway.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/e500_tlb.c')
-rw-r--r-- | arch/powerpc/kvm/e500_tlb.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c index b18fe353397d..e0ab2160932a 100644 --- a/arch/powerpc/kvm/e500_tlb.c +++ b/arch/powerpc/kvm/e500_tlb.c | |||
@@ -144,24 +144,6 @@ static inline void write_host_tlbe(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
144 | 144 | ||
145 | void kvmppc_e500_tlb_load(struct kvm_vcpu *vcpu, int cpu) | 145 | void kvmppc_e500_tlb_load(struct kvm_vcpu *vcpu, int cpu) |
146 | { | 146 | { |
147 | struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu); | ||
148 | int i; | ||
149 | unsigned register mas0; | ||
150 | |||
151 | /* Load all valid TLB1 entries to reduce guest tlb miss fault */ | ||
152 | local_irq_disable(); | ||
153 | mas0 = mfspr(SPRN_MAS0); | ||
154 | for (i = 0; i < tlb1_max_shadow_size(); i++) { | ||
155 | struct tlbe *stlbe = &vcpu_e500->shadow_tlb[1][i]; | ||
156 | |||
157 | if (get_tlb_v(stlbe)) { | ||
158 | mtspr(SPRN_MAS0, MAS0_TLBSEL(1) | ||
159 | | MAS0_ESEL(to_htlb1_esel(i))); | ||
160 | __write_host_tlbe(stlbe); | ||
161 | } | ||
162 | } | ||
163 | mtspr(SPRN_MAS0, mas0); | ||
164 | local_irq_enable(); | ||
165 | } | 147 | } |
166 | 148 | ||
167 | void kvmppc_e500_tlb_put(struct kvm_vcpu *vcpu) | 149 | void kvmppc_e500_tlb_put(struct kvm_vcpu *vcpu) |