qemu-devel
[Top][All Lists]
Advanced

[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: Prasad Pandit
Subject: Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations
Date: Tue, 5 Mar 2024 18:07:24 +0530

Hi,

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

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)

* If such change requires API changes (I'm not sure how), then
probably it is outside the scope of this patch.

...wdyt?

Thank you.
---
  - Prasad




reply via email to

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