Skip to content
Commit 762b33eb authored by Like Xu's avatar Like Xu Committed by Sean Christopherson
Browse files

KVM: x86/mmu: Assert on @mmu in the __kvm_mmu_invalidate_addr()



Add assertion to track that "mmu == vcpu->arch.mmu" is always true in the
context of __kvm_mmu_invalidate_addr(). for_each_shadow_entry_using_root()
and kvm_sync_spte() operate on vcpu->arch.mmu, but the only reason that
doesn't cause explosions is because handle_invept() frees roots instead of
doing a manual invalidation.  As of now, there are no major roadblocks
to switching INVEPT emulation over to use kvm_mmu_invalidate_addr().

Suggested-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarLike Xu <likexu@tencent.com>
Link: https://lore.kernel.org/r/20230523032947.60041-1-likexu@tencent.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 12ced095
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment