[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PULL 02/45] vl.c deprecate incorrect CPUs topology
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PULL 02/45] vl.c deprecate incorrect CPUs topology |
Date: |
Sun, 21 Oct 2018 18:38:20 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Oct 18, 2018 at 05:03:39PM -0300, Eduardo Habkost wrote:
> From: Igor Mammedov <address@hidden>
>
> -smp [cpus],sockets/cores/threads[,maxcpus] should describe topology
> so that total number of logical CPUs [sockets * cores * threads]
> would be equal to [maxcpus], however historically we didn't have
> such check in QEMU and it is possible to start VM with an invalid
> topology.
> Deprecate invalid options combination so we can make sure that
> the topology VM started with is always correct in the future.
> Users with an invalid sockets/cores/threads/maxcpus values should
> fix their CLI to make sure that
> [sockets * cores * threads] == [maxcpus]
>
> Signed-off-by: Igor Mammedov <address@hidden>
> Reviewed-by: Andrew Jones <address@hidden>
> Reviewed-by: Eduardo Habkost <address@hidden>
> Message-Id: <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> vl.c | 7 +++++++
> qemu-deprecated.texi | 12 ++++++++++++
> 2 files changed, 19 insertions(+)
>
> diff --git a/vl.c b/vl.c
> index 4e25c78bff..027d04c7ca 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1235,6 +1235,13 @@ static void smp_parse(QemuOpts *opts)
> exit(1);
> }
>
> + if (sockets * cores * threads != max_cpus) {
> + warn_report("Invalid CPU topology deprecated: "
> + "sockets (%u) * cores (%u) * threads (%u) "
> + "!= maxcpus (%u)",
> + sockets, cores, threads, max_cpus);
> + }
> +
> smp_cpus = cpus;
> smp_cores = cores;
> smp_threads = threads;
> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> index 11b870c5c1..5d2d7a3588 100644
> --- a/qemu-deprecated.texi
> +++ b/qemu-deprecated.texi
> @@ -86,6 +86,18 @@ for these file types is 'host_cdrom' or 'host_device' as
> appropriate.
> The @option{name} parameter of the @option{-net} option is a synonym
> for the @option{id} parameter, which should now be used instead.
>
> address@hidden -smp (invalid topologies) (since 3.1)
> +
> +CPU topology properties should describe whole machine topology including
> +possible CPUs.
> +
> +However, historically it was possible to start QEMU with an incorrect
> topology
> +where @address@hidden <= @var{sockets} * @var{cores} * @var{threads} <
> @var{maxcpus}},
> +which could lead to an incorrect topology enumeration by the guest.
> +Support for invalid topologies will be removed, the user must ensure
> +topologies described with -smp include all possible cpus, i.e.
> + @address@hidden * @var{cores} * @var{threads} = @var{maxcpus}}.
> +
> @section QEMU Machine Protocol (QMP) commands
>
> @subsection block-dirty-bitmap-add "autoload" parameter (since 2.12.0)
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PULL 00/45] Machine queue, 2018-10-18, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 01/45] hostmem-file: fixed the memory leak while get pmem path., Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 02/45] vl.c deprecate incorrect CPUs topology, Eduardo Habkost, 2018/10/18
- Re: [Qemu-ppc] [PULL 02/45] vl.c deprecate incorrect CPUs topology,
David Gibson <=
- [Qemu-ppc] [PULL 03/45] vl:c: make sure that sockets are calculated correctly in '-smp X' case, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 04/45] numa: Fix QMP command set-numa-node error handling, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 05/45] trace-events: Fix copy/paste typo, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 06/45] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 11/45] hw/mips/gt64xxx_pci: Convert gt64120_reset() function into Device reset method, Eduardo Habkost, 2018/10/18
- [Qemu-ppc] [PULL 08/45] hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init, Eduardo Habkost, 2018/10/18