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: Paolo Bonzini
Subject: Re: [Qemu-devel] target-i386: clear bsp bit when designating bsp
Date: Tue, 07 Apr 2015 12:34:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


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.

Paolo

 Is this a hot-unplug
> preparation? Or is a KVM-specific call missing here? Either way, the
> commit message could use some clarification.



reply via email to

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