summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorJunaid Shahid <junaids@google.com>2018-06-28 00:59:18 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-08-06 18:59:00 +0300
commit956bf3531fba53c0501eda4fbc67950b0f7b913f (patch)
tree37e602fdc99567f8e5a702dfdbca00d415327099 /arch/x86/kvm/vmx.c
parent08fb59d8a47d5e1f9de08659603a47f117fe60d5 (diff)
downloadlinux-956bf3531fba53c0501eda4fbc67950b0f7b913f.tar.xz
kvm: x86: Skip shadow page resync on CR3 switch when indicated by guest
When the guest indicates that the TLB doesn't need to be flushed in a CR3 switch, we can also skip resyncing the shadow page tables since an out-of-sync shadow page table is equivalent to an out-of-sync TLB. Signed-off-by: Junaid Shahid <junaids@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6151418cec32..b81210051133 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8821,7 +8821,7 @@ static int handle_invpcid(struct kvm_vcpu *vcpu)
if (kvm_get_pcid(vcpu, vcpu->arch.mmu.prev_root.cr3)
== operand.pcid)
- kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
+ kvm_mmu_free_roots(vcpu, KVM_MMU_ROOT_PREVIOUS);
/*
* If neither the current cr3 nor the prev_root.cr3 use the