From 6cb2996cef5e273ef370e690e84b5e1403f5c391 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 1 Mar 2010 19:10:32 +0100 Subject: [PATCH] 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 --- hw/pc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.11.4.GIT