lkml.org 
[lkml]   [2022]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 7/9] kvm_main.c: duplicate invalid memslot also in inactive list
From
On 9/9/22 12:45, Emanuele Giuseppe Esposito wrote:
> /*
> - * if change is DELETE or MOVE, invalid is in active memslots
> - * and old in inactive, so replace old with new.
> + * if change is DELETE or MOVE, invalid is in both active and inactive
> + * memslot list. This means that we don't need old anymore, and
> + * we should replace invalid with new.
> */
> - kvm_replace_memslot(kvm, batch->old, batch->new);
> + if (batch->change == KVM_MR_DELETE || batch->change == KVM_MR_MOVE)
> + kvm_replace_memslot(kvm, batch->invalid, batch->new);
> + else
> + kvm_replace_memslot(kvm, batch->old, batch->new);

This is also

kvm_replace_memslot(kvm, batch->invalid ?: batch->old,
batch->new);

with no need to look at batch->change.

Paolo

\
 
 \ /
  Last update: 2022-09-28 19:20    [W:1.018 / U:1.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site