Re: [PATCH] hw/core/machine-smp: Remove deprecated "parameter=0" SMP configurations

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

 



Hi,

On Tue, 5 Mar 2024 at 12:59, Zhao Liu <zhao1.liu@xxxxxxxxxxxxxxx> 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
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux