summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-02 00:09:08 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-02 00:09:08 +0000
commitfec5fa0210a853635d3011fbce26f137206958c6 (patch)
treee7f8390850514517680a054fd9ebe39f7c835211
parentsuppress a couple of spurious warnings in scsi-generic.c (diff)
downloadqemu-kvm-fec5fa0210a853635d3011fbce26f137206958c6.tar.gz
qemu-kvm-fec5fa0210a853635d3011fbce26f137206958c6.tar.bz2
qemu-kvm-fec5fa0210a853635d3011fbce26f137206958c6.zip
Reset I32_APIC_BASE on system RESET
Should be done according to spec. Signed-off-by: Gleb Natapov <gleb@qumranet.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5128 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--hw/apic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/apic.c b/hw/apic.c
index 43d748cab..64e75ad0f 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -869,6 +869,10 @@ static int apic_load(QEMUFile *f, void *opaque, int version_id)
static void apic_reset(void *opaque)
{
APICState *s = opaque;
+
+ s->apicbase = 0xfee00000 |
+ (s->id ? 0 : MSR_IA32_APICBASE_BSP) | MSR_IA32_APICBASE_ENABLE;
+
apic_init_ipi(s);
if (s->id == 0) {
@@ -906,8 +910,6 @@ int apic_init(CPUState *env)
s->id = last_apic_id++;
env->cpuid_apic_id = s->id;
s->cpu_env = env;
- s->apicbase = 0xfee00000 |
- (s->id ? 0 : MSR_IA32_APICBASE_BSP) | MSR_IA32_APICBASE_ENABLE;
apic_reset(s);