diff options
author | Avi Kivity <avi@qumranet.com> | 2007-11-20 19:57:59 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:10 -0500 |
commit | d835dfecd00fd770288dcd9a46c0e0966d526fdf (patch) | |
tree | 9e80c69f9024e45b39cf0d1eeda56ba4a57567a6 /drivers/kvm/mmu.c | |
parent | 79539cec0c3c38d35a1e3e5310d2c562ae6e82b8 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index 281dd5f9310c..346aa65a08d5 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c | |||
@@ -1086,7 +1086,7 @@ static int nonpaging_init_context(struct kvm_vcpu *vcpu) | |||
1086 | return 0; | 1086 | return 0; |
1087 | } | 1087 | } |
1088 | 1088 | ||
1089 | static void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu) | 1089 | void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu) |
1090 | { | 1090 | { |
1091 | ++vcpu->stat.tlb_flush; | 1091 | ++vcpu->stat.tlb_flush; |
1092 | kvm_x86_ops->tlb_flush(vcpu); | 1092 | kvm_x86_ops->tlb_flush(vcpu); |