aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/44x.c
diff options
context:
space:
mode:
authorHollis Blanchard <hollisb@us.ibm.com>2008-12-02 16:51:56 -0500
committerAvi Kivity <avi@redhat.com>2008-12-31 09:55:09 -0500
commitc5fbdffbda79254047ec83b09c1a61a3655d052a (patch)
tree4fb1ba38fe722d514b62c284cc618768856eedf8 /arch/powerpc/kvm/44x.c
parent7924bd41097ae8991c6d38cef8b1e4058e30d198 (diff)
KVM: ppc: save and restore guest mappings on context switch
Store shadow TLB entries in memory, but only use it on host context switch (instead of every guest entry). This improves performance for most workloads on 440 by reducing the guest TLB miss rate. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/44x.c')
-rw-r--r--arch/powerpc/kvm/44x.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/powerpc/kvm/44x.c b/arch/powerpc/kvm/44x.c
index 05d72fc8b478..a66bec57265a 100644
--- a/arch/powerpc/kvm/44x.c
+++ b/arch/powerpc/kvm/44x.c
@@ -96,15 +96,12 @@ void kvmppc_core_load_guest_debugstate(struct kvm_vcpu *vcpu)
96 96
97void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu, int cpu) 97void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
98{ 98{
99 kvmppc_44x_tlb_load(vcpu);
99} 100}
100 101
101void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu) 102void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)
102{ 103{
103 /* XXX Since every guest uses TS=1 TID=0/1 mappings, we can't leave any TLB 104 kvmppc_44x_tlb_put(vcpu);
104 * entries around when we're descheduled, so we must completely flush the
105 * TLB of all guest mappings. On the other hand, if there is only one
106 * guest, this flush is completely unnecessary. */
107 _tlbia();
108} 105}
109 106
110int kvmppc_core_check_processor_compat(void) 107int kvmppc_core_check_processor_compat(void)