From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Eric Farman" <farman@linux.ibm.com>,
"Jason Herne" <jjherne@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Matthew Rosato" <mjrosato@linux.ibm.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
qemu-s390x@nongnu.org, "Ilya Leoshkevich" <iii@linux.ibm.com>,
"David Hildenbrand" <david@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH 11/12] hw/s390x/ccw: Remove S390CcwMachineClass::max_threads field
Date: Fri, 17 Oct 2025 15:30:00 +0200 [thread overview]
Message-ID: <20251017133002.61410-12-philmd@linaro.org> (raw)
In-Reply-To: <20251017133002.61410-1-philmd@linaro.org>
The S390CcwMachineClass::max_threads field was only used by the
s390-ccw-virtio-7.1 machine, which got removed. Remove it
as now unused, simplifying the s390_init_cpus() method.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/s390x/s390-virtio-ccw.h | 3 ---
hw/s390x/s390-virtio-ccw.c | 7 ++-----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h
index 526078a4e2b..db804db33c3 100644
--- a/include/hw/s390x/s390-virtio-ccw.h
+++ b/include/hw/s390x/s390-virtio-ccw.h
@@ -49,11 +49,8 @@ static inline uint64_t s390_get_memory_limit(S390CcwMachineState *s390ms)
void s390_handle_ptf(S390CPU *cpu, uint8_t r1, uintptr_t ra);
struct S390CcwMachineClass {
- /*< private >*/
MachineClass parent_class;
- /*< public >*/
- int max_threads;
bool use_cpi;
};
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index cf09b5c46e6..390d427dc41 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -75,12 +75,10 @@ out:
static void s390_init_cpus(MachineState *machine)
{
MachineClass *mc = MACHINE_GET_CLASS(machine);
- S390CcwMachineClass *s390mc = S390_CCW_MACHINE_CLASS(mc);
int i;
- if (machine->smp.threads > s390mc->max_threads) {
- error_report("S390 does not support more than %d threads.",
- s390mc->max_threads);
+ if (machine->smp.threads > 1) {
+ error_report("S390 does not support more than 1 thread.");
exit(1);
}
@@ -779,7 +777,6 @@ static void ccw_machine_class_init(ObjectClass *oc, const void *data)
S390CcwMachineClass *s390mc = S390_CCW_MACHINE_CLASS(mc);
DumpSKeysInterface *dsi = DUMP_SKEYS_INTERFACE_CLASS(oc);
- s390mc->max_threads = 1;
s390mc->use_cpi = true;
mc->reset = s390_machine_reset;
mc->block_default_type = IF_VIRTIO;
--
2.51.0
next prev parent reply other threads:[~2025-10-17 13:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 13:29 [PATCH 00/12] hw/s390x: Remove s390-ccw-virtio-4.2 -> s390-ccw-virtio-7.2 machines Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 01/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-4.2 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 02/12] hw/s390x/ccw: Remove SCLPDevice::increment_size field Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 03/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-5.0 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 04/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-5.1 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 05/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-5.2 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 06/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-6.0 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 07/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-6.1 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 08/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-6.2 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 09/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-7.0 machine Philippe Mathieu-Daudé
2025-10-17 13:29 ` [PATCH 10/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-7.1 machine Philippe Mathieu-Daudé
2025-10-17 13:30 ` Philippe Mathieu-Daudé [this message]
2025-10-17 13:30 ` [PATCH 12/12] hw/s390x/ccw: Remove deprecated s390-ccw-virtio-7.2 machine Philippe Mathieu-Daudé
2025-10-17 13:38 ` [PATCH 00/12] hw/s390x: Remove s390-ccw-virtio-4.2 -> s390-ccw-virtio-7.2 machines Thomas Huth
2025-10-17 13:40 ` Philippe Mathieu-Daudé
2025-10-17 13:55 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251017133002.61410-12-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=jjherne@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).