qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [libvirt] [PATCH v7 1/2] vl.c deprecate incorrect CPUs


From: Eric Blake
Subject: Re: [Qemu-devel] [libvirt] [PATCH v7 1/2] vl.c deprecate incorrect CPUs topology
Date: Wed, 12 Sep 2018 11:46:43 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 9/12/18 11:19 AM, Igor Mammedov wrote:
-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>
---

+++ b/qemu-deprecated.texi
@@ -139,6 +139,19 @@ The 'file' driver for drives is no longer appropriate for 
character or host
  devices and will only accept regular files (S_IFREG). The correct driver
  for these file types is 'host_cdrom' or 'host_device' as appropriate.
address@hidden -smp (invalid topologies) (since 3.1)
+
+CPU topology properties should describe whole machine topology including
+possible CPUs. In other words: @var{maxcpus} should be equal to
address@hidden@var{sockets} * @var{cores} * @var{threads}}.

This sentence...

+
+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}}.

...and this recommendation sound repetitive. I'd be okay if you removed the "In other words" sentence above, leaving just the intro statement (what -cpu is supposed to do), then the second paragraph (what we also allowed in the past, and how you should fix it before we stop allowing that).

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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