qemu-devel
[Top][All Lists]
Advanced

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

RE: [PATCH RFC V2 03/37] hw/arm/virt: Move setting of common CPU propert


From: Salil Mehta
Subject: RE: [PATCH RFC V2 03/37] hw/arm/virt: Move setting of common CPU properties in a function
Date: Mon, 2 Oct 2023 10:24:58 +0000

Hi Gavin,

> From: Gavin Shan <gshan@redhat.com>
> Sent: Wednesday, September 27, 2023 6:17 AM
> To: Salil Mehta <salil.mehta@huawei.com>; qemu-devel@nongnu.org; 
> qemu-arm@nongnu.org
> Cc: maz@kernel.org; jean-philippe@linaro.org; Jonathan Cameron
> <jonathan.cameron@huawei.com>; lpieralisi@kernel.org;
> peter.maydell@linaro.org; richard.henderson@linaro.org;
> imammedo@redhat.com; andrew.jones@linux.dev; david@redhat.com;
> philmd@linaro.org; eric.auger@redhat.com; will@kernel.org; ardb@kernel.org;
> oliver.upton@linux.dev; pbonzini@redhat.com; mst@redhat.com;
> rafael@kernel.org; borntraeger@linux.ibm.com; alex.bennee@linaro.org;
> linux@armlinux.org.uk; darren@os.amperecomputing.com;
> ilkka@os.amperecomputing.com; vishnu@os.amperecomputing.com;
> karl.heubaum@oracle.com; miguel.luis@oracle.com; salil.mehta@opnsrc.net;
> zhukeqian <zhukeqian1@huawei.com>; wangxiongfeng (C)
> <wangxiongfeng2@huawei.com>; wangyanan (Y) <wangyanan55@huawei.com>;
> jiakernel2@gmail.com; maobibo@loongson.cn; lixianglai@loongson.cn
> 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 <salil.mehta@huawei.com>
> > ---
> >   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

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