linux/arch/x86/kvm/mmu
Sean Christopherson acbda82a81 KVM: x86/mmu: Require mmu_lock be held for write to zap TDP MMU range
Now that all callers of zap_gfn_range() hold mmu_lock for write, drop
support for zapping with mmu_lock held for read.  That all callers hold
mmu_lock for write isn't a random coincidence; now that the paths that
need to zap _everything_ have their own path, the only callers left are
those that need to zap for functional correctness.  And when zapping is
required for functional correctness, mmu_lock must be held for write,
otherwise the caller has no guarantees about the state of the TDP MMU
page tables after it has run, e.g. the SPTE(s) it zapped can be
immediately replaced by a vCPU faulting in a page.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Ben Gardon <bgardon@google.com>
Message-Id: <20220226001546.360188-17-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-03-08 09:31:55 -05:00
..
mmu_internal.h KVM: x86/mmu: Zap only the target TDP MMU shadow page in NX recovery 2022-03-08 09:31:54 -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: Add helpers to read/write TDP MMU SPTEs and document RCU 2022-03-08 09:31:52 -05:00
tdp_iter.h KVM: x86/mmu: Zap only the target TDP MMU shadow page in NX recovery 2022-03-08 09:31:54 -05:00
tdp_mmu.c KVM: x86/mmu: Require mmu_lock be held for write to zap TDP MMU range 2022-03-08 09:31:55 -05:00
tdp_mmu.h KVM: x86/mmu: Zap only the target TDP MMU shadow page in NX recovery 2022-03-08 09:31:54 -05:00