Re: [PATCH v2 21/28] KVM: x86/mmu: Flush TLBs after zap in TDP MMU PF handler

2021-02-05 Thread Sean Christopherson
On Tue, Feb 02, 2021, Ben Gardon wrote: > +static inline bool tdp_mmu_zap_spte_atomic(struct kvm *kvm, > +struct tdp_iter *iter) > +{ > + /* > + * Freeze the SPTE by setting it to a special, > + * non-present value. This will stop other threads

[PATCH v2 21/28] KVM: x86/mmu: Flush TLBs after zap in TDP MMU PF handler

2021-02-02 Thread Ben Gardon
When the TDP MMU is allowed to handle page faults in parallel there is the possiblity of a race where an SPTE is cleared and then imediately replaced with a present SPTE pointing to a different PFN, before the TLBs can be flushed. This race would violate architectural specs. Ensure that the TLBs ar