]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Track root HPA instead of EPTP for paravirt Hyper-V TLB flush
authorSean Christopherson <sean.j.christopherson@intel.com>
Fri, 5 Mar 2021 18:31:23 +0000 (10:31 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Mar 2021 08:44:06 +0000 (04:44 -0400)
commitc31c709f94b14fd013c9b0bf750ec25dc04e86ac
tree17fa77ea4a7f78d0730e99600e62ae182c30ba7e
parentff6b8986480cd576fd7707d46052bbcf1a5de8d8
KVM: VMX: Track root HPA instead of EPTP for paravirt Hyper-V TLB flush

Track the address of the top-level EPT struct, a.k.a. the root HPA,
instead of the EPTP itself for Hyper-V's paravirt TLB flush.  The
paravirt API takes only the address, not the full EPTP, and in theory
tracking the EPTP could lead to false negatives, e.g. if the HPA matched
but the attributes in the EPTP do not.  In practice, such a mismatch is
extremely unlikely, if not flat out impossible, given how KVM generates
the EPTP.

Opportunsitically rename the related fields to use the 'root'
nomenclature, and to prefix them with 'hv_' to connect them to Hyper-V's
paravirt TLB flushing.

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-12-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h