aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2010-03-01 19:10:32 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-04 00:29:32 -0300
commit6cb2996cef5e273ef370e690e84b5e1403f5c391 (patch)
tree7f421e052ec89144adc966b95b22bd39f6526a34 /hw/pc.c
parentea64305139357e89f58fc05ff5d48dc233d44d87 (diff)
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 <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c3
1 files changed, 2 insertions, 1 deletions
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)