]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nSVM: Move TLB flushing logic (or lack thereof) to dedicated helper
authorSean Christopherson <seanjc@google.com>
Wed, 9 Jun 2021 23:42:26 +0000 (16:42 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:52 +0000 (13:09 -0400)
commit70b374d70b976ffe494ebf155026cd55e5680c21
tree1a2a7b9ac30e67be656b45a4f0c7d8b49c7f7ac0
parent20691a2d8b7ca5fded6fb8ad7b7eef3d3fe82a31
KVM: nSVM: Move TLB flushing logic (or lack thereof) to dedicated helper

Introduce nested_svm_transition_tlb_flush() and use it force an MMU sync
and TLB flush on nSVM VM-Enter and VM-Exit instead of sneaking the logic
into the __kvm_mmu_new_pgd() call sites.  Add a partial todo list to
document issues that need to be addressed before the unconditional sync
and flush can be modified to look more like nVMX's logic.

In addition to making nSVM's forced flushing more overt (guess who keeps
losing track of it), the new helper brings further convergence between
nSVM and nVMX, and also sets the stage for dropping the "skip" params
from __kvm_mmu_new_pgd().

Cc: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210609234235.1244004-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/svm/nested.c