Am 07.04.2015 um 12:34 schrieb Paolo Bonzini: > On 07/04/2015 12:15, Andreas Färber wrote: >>>>>> diff --git a/target-i386/cpu.c b/target-i386/cpu.c >>>>>> index b2d1c95..03b33cf 100644 >>>>>> --- a/target-i386/cpu.c >>>>>> +++ b/target-i386/cpu.c >>>>>> @@ -2714,9 +2714,7 @@ static void x86_cpu_reset(CPUState *s) >>>>>> >>>>>> #if !defined(CONFIG_USER_ONLY) >>>>>> /* We hard-wire the BSP to the first CPU. */ >>>>>> - if (s->cpu_index == 0) { >>>>>> - apic_designate_bsp(cpu->apic_state); >>>>>> - } >>>>>> + apic_designate_bsp(cpu->apic_state, s->cpu_index == 0); >>>>>> >>>>>> s->halted = !cpu_is_bsp(cpu); >>>>>> >>>>>> >>>> >>>> Thanks, applied locally. >> I don't understand why this is necessary: The cpu_index doesn't change, >> therefore the BSP designation won't change either. > > It can change at runtime, though, if you're using the KVM in-kernel LAPIC.
Got a pointer? A quick git-grep doesn't show anything in hw/ or kvm-all.c or target-i386/ assigning cpu_index, so it'll always have the initial value. Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG Nürnberg)