[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP con
From: |
Zhao Liu |
Subject: |
Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations |
Date: |
Wed, 6 Mar 2024 11:33:13 +0800 |
Hi Prasad,
> On Tue, 5 Mar 2024 at 12:59, Zhao Liu <zhao1.liu@linux.intel.com> wrote:
> > After simple test, if user sets maxcpus as 0, the has_maxcpus will be
> > true as well...I think it's related with QAPI code generation logic.
>
> * Right.
>
> [Maybe we digressed a bit in the discussion, so I snipped much of the
> details here. Sorry about that.]
>
> * "if user sets maxcpus as 0, the has_maxcpus will be true as well",
> ie if 'has_*' fields are always set
>
> unsigned maxcpus = config->has_maxcpus ? config->maxcpus : 0;
>
> then checking 'config->has_maxcpus ?' above is probably not required I
> think. It could just be
>
> maxcpus = config->maxcpus
Yes.
> If a user does not specify config->maxcpus with -smp option, then it
> could default to zero(0) in 'config' parameter? (same for other config
> fields)
Yes. I could post another series for this cleanup soon.
> * If such change requires API changes (I'm not sure how), then
> probably it is outside the scope of this patch.
>
> ...wdyt?
>
The above change you suggested doesn't require API changes ;-).
Thanks,
Zhao
- [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Zhao Liu, 2024/03/03
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Thomas Huth, 2024/03/04
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Prasad Pandit, 2024/03/04
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Zhao Liu, 2024/03/04
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Prasad Pandit, 2024/03/04
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Zhao Liu, 2024/03/05
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Prasad Pandit, 2024/03/05
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations,
Zhao Liu <=
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Prasad Pandit, 2024/03/05
- Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations, Zhao Liu, 2024/03/06