diff options
author | Avi Kivity <avi@qumranet.com> | 2007-11-21 02:57:59 +0200 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 17:53:10 +0200 |
commit | d835dfecd00fd770288dcd9a46c0e0966d526fdf (patch) | |
tree | 9e80c69f9024e45b39cf0d1eeda56ba4a57567a6 /drivers/kvm/mmu.c | |
parent | 79539cec0c3c38d35a1e3e5310d2c562ae6e82b8 (diff) | |
download | lwn-d835dfecd00fd770288dcd9a46c0e0966d526fdf.tar.gz lwn-d835dfecd00fd770288dcd9a46c0e0966d526fdf.zip |
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) 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); |