qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH 8/8] spapr: Clean up handling of LPCR power-saving


From: Cédric Le Goater
Subject: Re: [Qemu-ppc] [PATCH 8/8] spapr: Clean up handling of LPCR power-saving exit bits
Date: Thu, 3 May 2018 16:32:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 05/03/2018 01:59 PM, David Gibson wrote:
> On Thu, May 03, 2018 at 09:47:18AM +0200, Cédric Le Goater wrote:
>> On 05/03/2018 08:21 AM, David Gibson wrote:
>>> To prevent spurious wakeups on cpus that are supposed to be disabled, we
>>> need to clear the LPCR bits which control certain wakeup events.
>>> spapr_cpu_reset() has separate cases here for boot and non-boot (initially
>>> inactive) cpus.  rtas_start_cpu() then turns the LPCR bits on when the
>>> non-boot cpus are activated.
>>>
>>> But explicit checks against first_cpu are not how we usually do things:
>>> instead spapr_cpu_reset() generally sets things up for non-boot (inactive)
>>> cpus, then spapr_machine_reset() and/or rtas_start_cpu() override as
>>> necessary.
>>>
>>> So, do that instead.  Because the LPCR activation is identical for boot
>>> cpus and non-boot cpus just activated with rtas_start_cpu() we can put the
>>> code common in spapr_cpu_set_entry_state().
>>
>> This is much nicer.
>>
>>> Signed-off-by: David Gibson <address@hidden>
>>
>> Reviewed-by: Cédric Le Goater <address@hidden>
>>
>> and for the patchset :
>>
>> Tested-by: Cédric Le Goater <address@hidden>
>>
>> under KVM & TCG with cpu hotplug and unplug.
> 
> Thanks.  I've folded the series into ppc-for-2.13.

We still need that patch for unplug to work :

        http://patchwork.ozlabs.org/patch/904229/

C.

>> There is still a spapr_cpu_reset() call under spapr_cpu_init().
>> Is that on purpose ?
> 
> Sort of.  I'd still like to remove it, but figuring out how to do so
> safely is going to take a bit longer.  Well, probably quite a lot
> longer, since I doubt I'll get it done before I go away.
> 




reply via email to

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