aboutsummaryrefslogtreecommitdiff
path: root/hw/apic.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-08-30 15:52:09 +0300
committerAvi Kivity <avi@redhat.com>2009-08-30 15:52:09 +0300
commit9c1257ac640c0e0ddd39d578666f36cac6f04e69 (patch)
treec7196c1f339563687d762182b5d9b82ddae383b7 /hw/apic.c
parentMerge commit '09aaa1602f9381c0e0fb539390b1793e51bdfc7b' into upstream-merge (diff)
parentkvm: Simplify cpu_synchronize_state() (diff)
downloadqemu-kvm-9c1257ac640c0e0ddd39d578666f36cac6f04e69.tar.gz
qemu-kvm-9c1257ac640c0e0ddd39d578666f36cac6f04e69.tar.bz2
qemu-kvm-9c1257ac640c0e0ddd39d578666f36cac6f04e69.zip
Merge commit '4c0960c0c483fffc5f8e1dab169d946ac295bf44' into upstream-merge
* commit '4c0960c0c483fffc5f8e1dab169d946ac295bf44': kvm: Simplify cpu_synchronize_state() Conflicts: hw/apic.c target-i386/machine.c Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/apic.c')
-rw-r--r--hw/apic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 5ed2a87c9..18db3be4e 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -1059,8 +1059,11 @@ static const VMStateDescription vmstate_apic = {
static void apic_reset(void *opaque)
{
APICState *s = opaque;
- int bsp = cpu_is_bsp(s->cpu_env);
+ int bsp;
+ cpu_synchronize_state(s->cpu_env);
+
+ bsp = cpu_is_bsp(s->cpu_env);
s->apicbase = 0xfee00000 |
(bsp ? MSR_IA32_APICBASE_BSP : 0) | MSR_IA32_APICBASE_ENABLE;
@@ -1075,7 +1078,6 @@ static void apic_reset(void *opaque)
*/
s->lvt[APIC_LVT_LINT0] = 0x700;
}
- cpu_synchronize_state(s->cpu_env, 1);
qemu_kvm_load_lapic(s->cpu_env);
}