linux/arch/x86/kvm/mmu
Sean Christopherson c8e5a0d0e9 KVM: x86/mmu: Check for !leaf=>leaf, not PFN change, in TDP MMU SP removal
Look for a !leaf=>leaf conversion instead of a PFN change when checking
if a SPTE change removed a TDP MMU shadow page.  Convert the PFN check
into a WARN, as KVM should never change the PFN of a shadow page (except
when its being zapped or replaced).

From a purely theoretical perspective, it's not illegal to replace a SP
with a hugepage pointing at the same PFN.  In practice, it's impossible
as that would require mapping guest memory overtop a kernel-allocated SP.
Either way, the check is odd.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Message-Id: <20220226001546.360188-8-seanjc@google.com>
Reviewed-by: Mingwei Zhang <mizhang@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-08 09:31:51 -05:00
..
mmu_internal.h KVM: x86/mmu: Propagate memslot const qualifier 2021-12-08 04:24:43 -05:00
mmu.c KVM: x86/mmu: Document that zapping invalidated roots doesn't need to flush 2022-03-08 09:31:36 -05:00
mmutrace.h KVM: x86/mmu: Add tracepoint for splitting huge pages 2022-02-10 13:50:43 -05:00
page_track.c KVM: use __vcalloc for very large allocations 2022-03-08 09:30:57 -05:00
paging_tmpl.h KVM: x86: use struct kvm_mmu_root_info for mmu->root 2022-02-25 08:20:16 -05:00
paging.h KVM: x86/mmu: Do not apply HPA (memory encryption) mask to GPAs 2021-07-14 12:17:56 -04:00
spte.c KVM: x86/mmu: Split huge pages mapped by the TDP MMU when dirty logging is enabled 2022-02-10 13:50:42 -05:00
spte.h KVM: x86/mmu: Split huge pages mapped by the TDP MMU when dirty logging is enabled 2022-02-10 13:50:42 -05:00
tdp_iter.c KVM: x86/mmu: Refactor TDP MMU iterators to take kvm_mmu_page root 2022-02-10 13:50:40 -05:00
tdp_iter.h KVM: x86/mmu: Refactor TDP MMU iterators to take kvm_mmu_page root 2022-02-10 13:50:40 -05:00
tdp_mmu.c KVM: x86/mmu: Check for !leaf=>leaf, not PFN change, in TDP MMU SP removal 2022-03-08 09:31:51 -05:00
tdp_mmu.h KVM: x86: use struct kvm_mmu_root_info for mmu->root 2022-02-25 08:20:16 -05:00