]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: WARN if old _or_ new SPTE is REMOVED in non-atomic path
authorSean Christopherson <seanjc@google.com>
Sat, 26 Feb 2022 00:15:29 +0000 (00:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Mar 2022 14:31:53 +0000 (09:31 -0500)
commit65992f68c73df03e648a67b8089e930a88760d2a
treece62ddc803568d17cb548b0a3bc99ce8c70fc993
parent3117e69d168cccc5ce9c0e5391c7c57595a8abc1
KVM: x86/mmu: WARN if old _or_ new SPTE is REMOVED in non-atomic path

WARN if the new_spte being set by __tdp_mmu_set_spte() is a REMOVED_SPTE,
which is called out by the comment as being disallowed but not actually
checked.  Keep the WARN on the old_spte as well, because overwriting a
REMOVED_SPTE in the non-atomic path is also disallowed (as evidence by
lack of splats with the existing WARN).

Fixes: e952b8e70564 ("KVM: x86/mmu: Flush TLBs after zap in TDP MMU PF handler")
Cc: Ben Gardon <bgardon@google.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Message-Id: <20220226001546.360188-12-seanjc@google.com>
Reviewed-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c