Re: [PATCH v6 17/22] KVM: Terminate memslot walks via used_slots
From: Paolo Bonzini
Date: Fri Feb 21 2020 - 12:48:05 EST
On 18/02/20 22:07, Sean Christopherson wrote:
> tmp = id_to_memslot(__kvm_memslots(kvm, as_id), id);
> - old = *tmp;
> - tmp = NULL;
> + if (tmp) {
> + old = *tmp;
> + tmp = NULL;
> + } else {
> + memset(&old, 0, sizeof(old));
> + old.id = id;
> + }
>
So much for my previous brilliant suggestion. :)
Paolo