aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2008-04-11 13:24:41 -0300
committerAvi Kivity <avi@qumranet.com>2008-04-13 18:01:02 +0300
commit1dbed348ceb6b697c95ed5a4fff4aae9416fc0cb (patch)
tree38a4bc15c968aefc50d92e5b686905f27a25d3e1 /qemu-kvm-x86.c
parentMake sure all vcpus are paused before saving state (diff)
downloadqemu-kvm-1dbed348ceb6b697c95ed5a4fff4aae9416fc0cb.tar.gz
qemu-kvm-1dbed348ceb6b697c95ed5a4fff4aae9416fc0cb.tar.bz2
qemu-kvm-1dbed348ceb6b697c95ed5a4fff4aae9416fc0cb.zip
Properly copy the in-kernel apicbase value
The MSR_IA32_APICBASE_ENABLE/MSR_IA32_APICBASE_BSP bits in s->apicbase are not initialized if in-kernel APIC emulation is used, so save the actual value passed by cpu_set_apic_base() caller. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'qemu-kvm-x86.c')
-rw-r--r--qemu-kvm-x86.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 3d3878a06..7c344ed10 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -248,13 +248,8 @@ void kvm_arch_load_regs(CPUState *env)
sregs.cr3 = env->cr[3];
sregs.cr4 = env->cr[4];
- if (kvm_irqchip_in_kernel(kvm_context)) {
- sregs.cr8 = kvm_get_cr8(kvm_context, env->cpu_index);
- sregs.apic_base = kvm_get_apic_base(kvm_context, env->cpu_index);
- } else {
- sregs.cr8 = cpu_get_apic_tpr(env);
- sregs.apic_base = cpu_get_apic_base(env);
- }
+ sregs.cr8 = cpu_get_apic_tpr(env);
+ sregs.apic_base = cpu_get_apic_base(env);
sregs.efer = env->efer;