From cd5dd64a00b75f2242e159662fe92a1504d3fcf9 Mon Sep 17 00:00:00 2001 From: Gleb Natapov <gleb@redhat.com> Date: Tue, 16 Jun 2009 11:44:44 +0300 Subject: [PATCH 2/2] Correctly assign apic ids for hotplugged cpus BIOS assumes that apic ids are continuous from 0 to max cpus when it builds its acpi/mptable tables, but QEMU allocates one id for ioapic, so hot plugged cpus are created with apic id skewed by one. OS cannot communicate with newly created cpu since the apic id of new cpu is not the same as what ACPI tells to an OS. Do not allocate apic id to ioapic. This shouldn't be done by QEMU anyway. This is BIOS or OS job. Upstream status: not needed. The code was rearranged and this line is not exist any more. BZ: 504581 (part of it. Should fix f10. rhel5.3 does not support cpu hot-plug) Signed-off-by: Gleb Natapov <gleb@redhat.com> Message-ID: <20090616084444.GQ19508@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> RH-Upstream-status: not-needed Acked-by: Glauber Costa <glommer@redhat.com> Acked-by: Avi Kivity <avi@redhat.com> Acked-by: Don Dutile <ddutile@redhat.com> Bugzilla: 504237 --- qemu/hw/apic.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c index 41b8e9c..e0bb474 100644 --- a/qemu/hw/apic.c +++ b/qemu/hw/apic.c @@ -1315,7 +1315,6 @@ IOAPICState *ioapic_init(void) if (!s) return NULL; ioapic_reset(s); - s->id = last_apic_id++; io_memory = cpu_register_io_memory(0, ioapic_mem_read, ioapic_mem_write, s); -- 1.6.3.rc4.29.g8146