lkml.org 
[lkml]   [2020]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: x86/mmu: Don't put invalid SPs back on the list of active pages
From
Date
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...

Paolo

\
 
 \ /
  Last update: 2020-06-23 02:24    [W:0.064 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site