summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-12-10 17:42:18 +0200
committerAvi Kivity <avi@redhat.com>2009-12-10 17:42:18 +0200
commitc8fc2e486fb6306f998804f602a72ab41459cc7b (patch)
tree00d23e420015c11c158646cfa08eb2939ef1ce60 /qemu-kvm-x86.c
parenttpr patching: use cpu_synchronize_state() instead of saving registers directly (diff)
downloadqemu-kvm-c8fc2e486fb6306f998804f602a72ab41459cc7b.tar.gz
qemu-kvm-c8fc2e486fb6306f998804f602a72ab41459cc7b.tar.bz2
qemu-kvm-c8fc2e486fb6306f998804f602a72ab41459cc7b.zip
tpr patching: defer post-migration load to vcpu context
This makes sure the cpu state is properly loaded. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'qemu-kvm-x86.c')
-rw-r--r--qemu-kvm-x86.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 1f0d37a75..7b7bc0f43 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -1401,6 +1401,9 @@ int kvm_arch_halt(CPUState *env)
int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
{
+ if (env->update_vapic) {
+ kvm_tpr_enable_vapic(env);
+ }
if (!kvm_irqchip_in_kernel())
kvm_set_cr8(env, cpu_get_apic_tpr(env));
return 0;