qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] target-i386: clear bsp bit when designating bsp


From: Andreas Färber
Subject: Re: [Qemu-devel] target-i386: clear bsp bit when designating bsp
Date: Tue, 07 Apr 2015 12:44:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]