kvm: update_memslots: clean flags for invalid memslots
Indeed, any invalid memslots should be new->npages = 0, new->base_gfn = 0 and new->flags = 0 at the same time. Signed-off-by: Tiejun Chen <tiejun.chen@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Родитель
128ca093cc
Коммит
b0165f1b41
|
@ -675,6 +675,7 @@ static void update_memslots(struct kvm_memslots *slots,
|
|||
if (!new->npages) {
|
||||
WARN_ON(!mslots[i].npages);
|
||||
new->base_gfn = 0;
|
||||
new->flags = 0;
|
||||
if (mslots[i].npages)
|
||||
slots->used_slots--;
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче