Only execute lapic load when cpu is already initialized
In a later patch, we will reorder the execution of vcpu initialization.
After that, the first call to KVM_SET_LAPIC ioctl will not find an
existant vcpu. So we introduce a function that tell us that the vcpu
is already initialized, and is it safe to call the ioctl.
This patch is included first rather than after, so nothing breaks,
and we can keep the tree bisectable.
Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>