From: Jan Kiszka Date: Mon, 1 Mar 2010 18:10:32 +0000 (+0100) Subject: x86: Extend validity of bsp_to_cpu X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6cb2996cef5e273ef370e690e84b5e1403f5c391;p=qemu.git x86: Extend validity of bsp_to_cpu As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals cpu_index, bsp_to_cpu can also be based on the latter directly. This will help an early user of it: KVM while initializing mp_state. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- diff --git a/hw/pc.c b/hw/pc.c index bdc297f717..e50a48848d 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -760,7 +760,8 @@ static void pc_init_ne2k_isa(NICInfo *nd) int cpu_is_bsp(CPUState *env) { - return env->cpuid_apic_id == 0; + /* We hard-wire the BSP to the first CPU. */ + return env->cpu_index == 0; } static CPUState *pc_new_cpu(const char *cpu_model)