[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200623011541.GD6151@linux.intel.com>
Date: Mon, 22 Jun 2020 18:15:41 -0700
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: Don't put invalid SPs back on the list of
active pages
On Tue, Jun 23, 2020 at 02:23:53AM +0200, Paolo Bonzini wrote:
> On 22/06/20 21:18, Sean Christopherson wrote:
> > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> > index fdd05c233308..fa5bd3f987dd 100644
> > --- a/arch/x86/kvm/mmu/mmu.c
> > +++ b/arch/x86/kvm/mmu/mmu.c
> > @@ -2757,10 +2757,13 @@ static bool __kvm_mmu_prepare_zap_page(struct kvm *kvm,
> > if (!sp->root_count) {
> > /* Count self */
> > (*nr_zapped)++;
> > - list_move(&sp->link, invalid_list);
> > + if (sp->role.invalid)
> > + list_add(&sp->link, invalid_list);
> > + else
> > + list_move(&sp->link, invalid_list);
>
> It's late here, but I think this part needs a comment anyway...
No argument here. I'll spin a v2, I just realized there is a separate
optimization that can build on this patch. I was planning on sending it
separately, but I misread the loop in make_mmu_pages_available().
Powered by blists - more mailing lists