Make sure kvm_vpu_init is the last thing called in cpu initialization
commitb14c0831f99b9a75a41c482a31f3bdc4080b75e7
authorGlauber Costa <glommer@redhat.com>
Tue, 26 May 2009 21:33:01 +0000 (26 17:33 -0400)
committerAvi Kivity <avi@redhat.com>
Sun, 31 May 2009 09:40:14 +0000 (31 12:40 +0300)
treee579dcbab07113f3b68cc4cfdf468e65577164c2
parent29917d22f69469de5284c78ea6e9a9cf9053a04f
Make sure kvm_vpu_init is the last thing called in cpu initialization

KVM access some state that is only present late in cpu initialization.
This happens in kvm_vcpu_init(). APIC is an example of that.

So we have to make sure that kvm_vcpu_init is the last thing called
in the initialization process.

We also have to explicitly call qemu_kvm_load_apic(), since the
first call will find the vcpu non initialized.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
hw/pc.c
qemu-kvm-x86.c
target-i386/helper.c