Re: [PATCH] KVM: x86/mmu: Skip !MMU-present SPTEs when removing SP in exclusive mode

2021-03-12 Thread Paolo Bonzini
On 10/03/21 23:24, Ben Gardon wrote: On Wed, Mar 10, 2021 at 1:14 PM Sean Christopherson wrote: On Wed, Mar 10, 2021, Paolo Bonzini wrote: On 10/03/21 01:30, Sean Christopherson wrote: diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c index 50ef757c5586..f0c99fa04ef2

Re: [PATCH] KVM: x86/mmu: Skip !MMU-present SPTEs when removing SP in exclusive mode

2021-03-10 Thread Ben Gardon
On Wed, Mar 10, 2021 at 1:14 PM Sean Christopherson wrote: > > On Wed, Mar 10, 2021, Paolo Bonzini wrote: > > On 10/03/21 01:30, Sean Christopherson wrote: > > > diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c > > > index 50ef757c5586..f0c99fa04ef2 100644 > > > ---

Re: [PATCH] KVM: x86/mmu: Skip !MMU-present SPTEs when removing SP in exclusive mode

2021-03-10 Thread Sean Christopherson
On Wed, Mar 10, 2021, Paolo Bonzini wrote: > On 10/03/21 01:30, Sean Christopherson wrote: > > diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c > > index 50ef757c5586..f0c99fa04ef2 100644 > > --- a/arch/x86/kvm/mmu/tdp_mmu.c > > +++ b/arch/x86/kvm/mmu/tdp_mmu.c > > @@ -323,7

Re: [PATCH] KVM: x86/mmu: Skip !MMU-present SPTEs when removing SP in exclusive mode

2021-03-10 Thread Paolo Bonzini
On 10/03/21 01:30, Sean Christopherson wrote: diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c index 50ef757c5586..f0c99fa04ef2 100644 --- a/arch/x86/kvm/mmu/tdp_mmu.c +++ b/arch/x86/kvm/mmu/tdp_mmu.c @@ -323,7 +323,18 @@ static void handle_removed_tdp_mmu_page(struct kvm

[PATCH] KVM: x86/mmu: Skip !MMU-present SPTEs when removing SP in exclusive mode

2021-03-09 Thread Sean Christopherson
If mmu_lock is held for write, don't bother setting !PRESENT SPTEs to REMOVED_SPTE when recursively zapping SPTEs as part of shadow page removal. The concurrent write protections provided by REMOVED_SPTE are not needed, there are no backing page side effects to record, and MMIO SPTEs can be left