Hi Gavin,

> From: Gavin Shan <[email protected]>
> Sent: Wednesday, September 27, 2023 6:17 AM
> To: Salil Mehta <[email protected]>; [email protected]; 
> [email protected]
> Cc: [email protected]; [email protected]; Jonathan Cameron
> <[email protected]>; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> zhukeqian <[email protected]>; wangxiongfeng (C)
> <[email protected]>; wangyanan (Y) <[email protected]>;
> [email protected]; [email protected]; [email protected]
> Subject: Re: [PATCH RFC V2 03/37] hw/arm/virt: Move setting of common CPU
> properties in a function
> 
> Hi Salil,
> 
> On 9/26/23 20:04, Salil Mehta wrote:
> > Factor out CPU properties code common for {hot,cold}-plugged CPUs. This
> allows
> > code reuse.
> >
> > Signed-off-by: Salil Mehta <[email protected]>
> > ---
> >   hw/arm/virt.c         | 220 ++++++++++++++++++++++++++----------------
> >   include/hw/arm/virt.h |   4 +
> >   2 files changed, 140 insertions(+), 84 deletions(-)
> >
> > diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> > index 57fe97c242..0eb6bf5a18 100644
> > --- a/hw/arm/virt.c
> > +++ b/hw/arm/virt.c
> > @@ -2018,16 +2018,130 @@ static void virt_cpu_post_init(VirtMachineState
> *vms, MemoryRegion *sysmem)
> >       }
> >   }
> >

[...]


> > +    }
> > +
> > +    /*
> > +     * RFC: Question: this must only be called for the hotplugged cpus. 
> > For the
> > +     * cold booted secondary cpus this is being taken care in 
> > arm_load_kernel()
> > +     * in boot.c. Perhaps we should remove that code now?
> > +     */
> > +    if (vms->psci_conduit != QEMU_PSCI_CONDUIT_DISABLED) {
> > +        object_property_set_int(cpuobj, "psci-conduit", vms->psci_conduit,
> > +                                NULL);
> > +
> > +        /* Secondary CPUs start in PSCI powered-down state */
> > +        if (CPU(cpuobj)->cpu_index > 0) {
> > +            object_property_set_bool(cpuobj, "start-powered-off", true, 
> > NULL);
> > +        }
> > +    }
> > +
> > +out:
> > +    if (local_err) {
> > +        error_propagate(errp, local_err);
> > +    }
> > +    return;
>         ^^^^^^
> 
> It's not needed obviously :)


Yep, will remove that.


Thanks
Salil.


Reply via email to