qemu-s390x
[Top][All Lists]
Advanced

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

Re: [PATCH v9 01/10] s390x/cpus: Make absence of multithreading clear


From: Pierre Morel
Subject: Re: [PATCH v9 01/10] s390x/cpus: Make absence of multithreading clear
Date: Mon, 10 Oct 2022 19:20:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1



On 9/28/22 20:11, Daniel P. Berrangé wrote:
On Fri, Sep 02, 2022 at 09:55:22AM +0200, Pierre Morel wrote:
S390x do not support multithreading in the guest.
Do not let admin falsely specify multithreading on QEMU
smp commandline.

Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
---
  hw/s390x/s390-virtio-ccw.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 70229b102b..b5ca154e2f 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -86,6 +86,9 @@ static void s390_init_cpus(MachineState *machine)
      MachineClass *mc = MACHINE_GET_CLASS(machine);
      int i;
+ /* Explicitely do not support threads */
+    assert(machine->smp.threads == 1);

What is the functional effect for currently released QEMU versions
if a user has set threads == 2  for an s390 machine ?  Is the
threads setting simply ignored ?

It is not ignored, the number of CPUs per sockets seen by the guest is cores*threads


If we want to eliminate this mistake, then there's two possible
options

   * If it had no effect, treat this like a deprecation process
     where we print a warning for 2 releases, and then turn the
     warning into an error. Gives a little grace to fix the config
     mistakes some users might have made, at a time convenient to
     them.

Or

   * If it had effect and we need migration compatibility then forbid
     threads > 1 only for new machine type versions, so existing
     deployed guests are not changed.

With regards,
Daniel

Thanks for your comments Daniel.
I will need to forbid threads > 1 for new machine.

regards,
Pierre




--
Pierre Morel
IBM Lab Boeblingen



reply via email to

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