Only execute lapic load when cpu is already initialized
commitc0273666b086f8021d8d4fd97bd6185cc48c085d
authorGlauber Costa <glommer@redhat.com>
Tue, 26 May 2009 21:32:59 +0000 (26 17:32 -0400)
committerAvi Kivity <avi@redhat.com>
Sun, 31 May 2009 09:39:59 +0000 (31 12:39 +0300)
tree9a2b0555c31300c199d4d9fc13c63db1538e0600
parent36f8d35287261e1b67c7f1f7f27256cd07dd970e
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>
hw/apic.c
qemu-kvm.c
qemu-kvm.h