[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v11 02/14] machine: Minor refactor/fix for the smp parsers
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v11 02/14] machine: Minor refactor/fix for the smp parsers |
Date: |
Tue, 28 Sep 2021 11:06:15 +0100 |
User-agent: |
Mutt/2.0.7 (2021-05-04) |
On Tue, Sep 28, 2021 at 11:57:43AM +0800, Yanan Wang wrote:
> To pave the way for the functional improvement in later patches,
> make some refactor/cleanup for the smp parsers, including using
> local maxcpus instead of ms->smp.max_cpus in the calculation,
> defaulting dies to 0 initially like other members, cleanup the
> sanity check for dies.
>
> We actually also fix a hidden defect by avoiding directly using
> the provided *zero value* in the calculation, which could cause
> a segment fault (e.g. using dies=0 in the calculation).
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Reviewed-by: Andrew Jones <drjones@redhat.com>
> ---
> hw/core/machine.c | 18 ++++++++++--------
> hw/i386/pc.c | 23 ++++++++++++++---------
> 2 files changed, 24 insertions(+), 17 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH v11 00/14] machine: smp parsing fixes and improvement, Yanan Wang, 2021/09/27
- [PATCH v11 01/14] machine: Deprecate "parameter=0" SMP configurations, Yanan Wang, 2021/09/27
- [PATCH v11 02/14] machine: Minor refactor/fix for the smp parsers, Yanan Wang, 2021/09/27
- Re: [PATCH v11 02/14] machine: Minor refactor/fix for the smp parsers,
Daniel P . Berrangé <=
- [PATCH v11 05/14] machine: Improve the error reporting of smp parsing, Yanan Wang, 2021/09/27
- [PATCH v11 07/14] qtest/numa-test: Use detailed -smp CLIs in test_def_cpu_split, Yanan Wang, 2021/09/27
- [PATCH v11 08/14] machine: Prefer cores over sockets in smp parsing since 6.2, Yanan Wang, 2021/09/27
- [PATCH v11 06/14] qtest/numa-test: Use detailed -smp CLIs in pc_dynamic_cpu_cfg, Yanan Wang, 2021/09/27