KVM: VMX: Don't invalidate hv_tlb_eptp if the new EPTP matches
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 5 Mar 2021 18:31:19 +0000 (10:31 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:44:02 +0000 (04:44 -0400)
commitd0a2d45654c7b117236d8b276a6b8b8bf071e342
tree7b6737066120c185ddd6a7abef95b7aaf54b55be
parentcdbd4b40e70c63e15554120cf486194fd16cb905
KVM: VMX: Don't invalidate hv_tlb_eptp if the new EPTP matches

Don't invalidate the common EPTP, and thus trigger rechecking of EPTPs
across all vCPUs, if the new EPTP matches the old/common EPTP.  In all
likelihood this is a meaningless optimization, but there are (uncommon)
scenarios where KVM can reload the same EPTP.

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210305183123.3978098-8-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c