aboutsummaryrefslogtreecommitdiff
path: root/drivers/kvm/mmu.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-11-21 02:57:59 +0200
committerAvi Kivity <avi@qumranet.com>2008-01-30 17:53:10 +0200
commitd835dfecd00fd770288dcd9a46c0e0966d526fdf (patch)
tree9e80c69f9024e45b39cf0d1eeda56ba4a57567a6 /drivers/kvm/mmu.c
parent79539cec0c3c38d35a1e3e5310d2c562ae6e82b8 (diff)
KVM: Don't bother the mmu if cr3 load doesn't change cr3
If the guest requests just a tlb flush, don't take the vm lock and drop the mmu context pointlessly. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/mmu.c')
-rw-r--r--drivers/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 281dd5f9310..346aa65a08d 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -1086,7 +1086,7 @@ static int nonpaging_init_context(struct kvm_vcpu *vcpu)
return 0;
}
-static void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu)
+void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu)
{
++vcpu->stat.tlb_flush;
kvm_x86_ops->tlb_flush(vcpu);