diff options
author | Sean Christopherson <seanjc@google.com> | 2021-06-09 16:42:32 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-06-17 13:09:54 -0400 |
commit | e62f1aa8b9304f4608a6a1517e9041cec555c09d (patch) | |
tree | 8d51c4e9aea5c36e2023ca0171eb808a27b7792c | |
parent | 39353ab5790be2802b0de29caeba43015fb90dcf (diff) | |
download | linux-stable-e62f1aa8b9304f4608a6a1517e9041cec555c09d.tar.gz linux-stable-e62f1aa8b9304f4608a6a1517e9041cec555c09d.tar.bz2 linux-stable-e62f1aa8b9304f4608a6a1517e9041cec555c09d.zip |
KVM: x86: Defer MMU sync on PCID invalidation
Defer the MMU sync on PCID invalidation so that multiple sync requests in
a single VM-Exit are batched. This is a very minor optimization as
checking for unsync'd children is quite cheap.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210609234235.1244004-13-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 41b936187b2c..9ca30a3879d4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1074,7 +1074,7 @@ static void kvm_invalidate_pcid(struct kvm_vcpu *vcpu, unsigned long pcid) * happen anyway before switching to any other CR3. */ if (kvm_get_active_pcid(vcpu) == pcid) { - kvm_mmu_sync_roots(vcpu); + kvm_make_request(KVM_REQ_MMU_SYNC, vcpu); kvm_make_request(KVM_REQ_TLB_FLUSH_CURRENT, vcpu); } |