Re: [PATCH 2/3] KVM: X86: Implement PV sched yield hypercall

From: Wanpeng Li
Date: Mon May 27 2019 - 20:57:38 EST


On Mon, 27 May 2019 at 19:54, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 27/05/19 12:34, Wanpeng Li wrote:
> > + rcu_read_lock();
> > + map = rcu_dereference(kvm->arch.apic_map);
> > + target = map->phys_map[dest_id]->vcpu;
> > + rcu_read_unlock();
> > +
> > + kvm_vcpu_yield_to(target);
>
> This needs to check that map->phys_map[dest_id] is not NULL.

Fixed in v2, thanks for the quick review. :)

Regards,
Wanpeng Li