From nobody Sat May 4 15:18:23 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506606617839687.6950668985166; Thu, 28 Sep 2017 06:50:17 -0700 (PDT) Received: from localhost ([::1]:59314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZCi-0000q8-UY for importer@patchew.org; Thu, 28 Sep 2017 09:50:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZ9J-0006sU-2S for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxZ9G-0002Mu-0g for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44204) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxZ9F-0002L9-Qf for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:41 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93B731B257C; Thu, 28 Sep 2017 13:46:40 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-191.ams2.redhat.com [10.36.117.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D18D8FBEC; Thu, 28 Sep 2017 13:46:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 93B731B257C Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com From: David Hildenbrand To: qemu-devel@nongnu.org Date: Thu, 28 Sep 2017 15:46:05 +0200 Message-Id: <20170928134609.16985-2-david@redhat.com> In-Reply-To: <20170928134609.16985-1-david@redhat.com> References: <20170928134609.16985-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 28 Sep 2017 13:46:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 1/5] MAINTAINERS: use KVM s390x maintainers for kvm-stubs.c and kvm_s390x.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, David Hildenbrand , cohuck@redhat.com, Richard Henderson , Alexander Graf , Christian Borntraeger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Forgot it when factoring code out into these files. This is 100% s390x KVM material. Signed-off-by: David Hildenbrand Acked-by: Christian Borntraeger --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 932443df41..772ac209e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -299,6 +299,8 @@ M: Cornelia Huck M: Alexander Graf S: Maintained F: target/s390x/kvm.c +F: target/s390x/kvm_s390x.h +F: target/s390x/kvm-stub.c F: target/s390x/ioinst.[ch] F: target/s390x/machine.c F: hw/intc/s390_flic.c --=20 2.13.5 From nobody Sat May 4 15:18:23 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506606536400134.88381889753077; Thu, 28 Sep 2017 06:48:56 -0700 (PDT) Received: from localhost ([::1]:59308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZBN-00083a-8Q for importer@patchew.org; Thu, 28 Sep 2017 09:48:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZ9O-0006vL-Rd for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxZ9I-0002Qz-Ts for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxZ9I-0002Pc-OQ for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:44 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA2DDC0CB546; Thu, 28 Sep 2017 13:46:43 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-191.ams2.redhat.com [10.36.117.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC1EB8F35E; Thu, 28 Sep 2017 13:46:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BA2DDC0CB546 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com From: David Hildenbrand To: qemu-devel@nongnu.org Date: Thu, 28 Sep 2017 15:46:06 +0200 Message-Id: <20170928134609.16985-3-david@redhat.com> In-Reply-To: <20170928134609.16985-1-david@redhat.com> References: <20170928134609.16985-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 28 Sep 2017 13:46:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 2/5] s390x: raise CPU hotplug irq after really hotplugged X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, David Hildenbrand , cohuck@redhat.com, Richard Henderson , Alexander Graf , Christian Borntraeger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Let's move it into the machine, so we trigger the IRQ after setting ms->possible_cpus (which SCLP uses to construct the list of online CPUs). This also fixes a problem reported by Thomas Huth, whereby qemu can be crashed using the none machine qemu-s390x-softmmu -M none -monitor stdio -> device_add qemu-s390-cpu Reviewed-by: Christian Borntraeger Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 4 ++++ target/s390x/cpu.c | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 1bcb7000ab..ab234247f6 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -305,6 +305,10 @@ static void s390_cpu_plug(HotplugHandler *hotplug_dev, =20 g_assert(!ms->possible_cpus->cpus[cpu->env.core_id].cpu); ms->possible_cpus->cpus[cpu->env.core_id].cpu =3D OBJECT(dev); + + if (dev->hotplugged) { + raise_irq_cpu_hotplug(); + } } =20 static void s390_machine_reset(void) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 34538c3ab9..4920da3625 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -41,7 +41,6 @@ #include "hw/hw.h" #include "sysemu/arch_init.h" #include "sysemu/sysemu.h" -#include "hw/s390x/sclp.h" #endif =20 #define CR0_RESET 0xE0UL @@ -227,13 +226,6 @@ static void s390_cpu_realizefn(DeviceState *dev, Error= **errp) #endif =20 scc->parent_realize(dev, &err); - -#if !defined(CONFIG_USER_ONLY) - if (dev->hotplugged) { - raise_irq_cpu_hotplug(); - } -#endif - out: error_propagate(errp, err); } --=20 2.13.5 From nobody Sat May 4 15:18:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506606537200296.18233839104084; Thu, 28 Sep 2017 06:48:57 -0700 (PDT) Received: from localhost ([::1]:59309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZBO-00087F-Ax for importer@patchew.org; Thu, 28 Sep 2017 09:48:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZ9T-0006yJ-Ks for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxZ9N-0002Wj-SS for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36815) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxZ9N-0002WR-Jo for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:49 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F291E26EBFC; Thu, 28 Sep 2017 13:46:47 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-191.ams2.redhat.com [10.36.117.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 88A9B8FBEB; Thu, 28 Sep 2017 13:46:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F291E26EBFC Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com From: David Hildenbrand To: qemu-devel@nongnu.org Date: Thu, 28 Sep 2017 15:46:07 +0200 Message-Id: <20170928134609.16985-4-david@redhat.com> In-Reply-To: <20170928134609.16985-1-david@redhat.com> References: <20170928134609.16985-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 28 Sep 2017 13:46:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 3/5] s390x/cpumodel: fix max STFL(E) bit number X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, David Hildenbrand , cohuck@redhat.com, Richard Henderson , Alexander Graf , Christian Borntraeger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Not that it would matter in the near future, but it is actually 2048 bytes, therefore 16384 possible bits. Reviewed-by: Christian Borntraeger Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/cpu_features.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c index 1d3a036393..31a4676f05 100644 --- a/target/s390x/cpu_features.c +++ b/target/s390x/cpu_features.c @@ -381,7 +381,7 @@ void s390_add_from_feat_block(S390FeatBitmap features, = S390FeatType type, =20 switch (type) { case S390_FEAT_TYPE_STFL: - nr_bits =3D 2048; + nr_bits =3D 16384; break; case S390_FEAT_TYPE_PLO: nr_bits =3D 256; --=20 2.13.5 From nobody Sat May 4 15:18:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506606545928438.27226413352184; Thu, 28 Sep 2017 06:49:05 -0700 (PDT) Received: from localhost ([::1]:59311 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZBY-0008Cs-VH for importer@patchew.org; Thu, 28 Sep 2017 09:49:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZ9V-0006zI-5D for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:47:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxZ9R-0002XV-5t for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52141) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxZ9Q-0002XF-Mr for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:53 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1060E16FA74; Thu, 28 Sep 2017 13:46:51 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-191.ams2.redhat.com [10.36.117.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5897C907FE; Thu, 28 Sep 2017 13:46:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1060E16FA74 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com From: David Hildenbrand To: qemu-devel@nongnu.org Date: Thu, 28 Sep 2017 15:46:08 +0200 Message-Id: <20170928134609.16985-5-david@redhat.com> In-Reply-To: <20170928134609.16985-1-david@redhat.com> References: <20170928134609.16985-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 28 Sep 2017 13:46:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 4/5] target/s390x: get rid of next_core_id X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, David Hildenbrand , cohuck@redhat.com, Richard Henderson , Alexander Graf , Christian Borntraeger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" core_id is not needed by linux-user, as the core_id a.k.a. CPU address is only accessible from kernel space. Therefore, drop next_core_id and make cpu_index get autoassigned again for linux-user. While at it, shield core_id and cpuid completely from linux-user. cpuid can also only be queried from kernel space. Suggested-by: Igor Mammedov Reviewed-by: Igor Mammedov Signed-off-by: David Hildenbrand --- target/s390x/cpu-qom.h | 2 -- target/s390x/cpu.c | 14 +++++++------- target/s390x/cpu.h | 2 ++ target/s390x/cpu_models.c | 2 ++ 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h index 2e446fab51..0510c49e07 100644 --- a/target/s390x/cpu-qom.h +++ b/target/s390x/cpu-qom.h @@ -54,8 +54,6 @@ typedef struct S390CPUClass { bool is_migration_safe; const char *desc; =20 - uint32_t next_core_id; - DeviceRealize parent_realize; void (*parent_reset)(CPUState *cpu); void (*load_normal)(CPUState *cpu); diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 4920da3625..f42e28ea25 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -178,8 +178,9 @@ static void s390_cpu_realizefn(DeviceState *dev, Error = **errp) { CPUState *cs =3D CPU(dev); S390CPUClass *scc =3D S390_CPU_GET_CLASS(dev); +#if !defined(CONFIG_USER_ONLY) S390CPU *cpu =3D S390_CPU(dev); - CPUS390XState *env =3D &cpu->env; +#endif Error *err =3D NULL; =20 /* the model has to be realized before qemu_init_vcpu() due to kvm */ @@ -195,11 +196,6 @@ static void s390_cpu_realizefn(DeviceState *dev, Error= **errp) max_cpus - 1); goto out; } -#else - /* implicitly set for linux-user only */ - cpu->env.core_id =3D scc->next_core_id; - scc->next_core_id++; -#endif =20 if (cpu_exists(cpu->env.core_id)) { error_setg(&err, "Unable to add CPU with core-id: %" PRIu32 @@ -208,7 +204,9 @@ static void s390_cpu_realizefn(DeviceState *dev, Error = **errp) } =20 /* sync cs->cpu_index and env->core_id. The latter is needed for TCG. = */ - cs->cpu_index =3D env->core_id; + cs->cpu_index =3D cpu->env.core_id; +#endif + cpu_exec_realizefn(cs, &err); if (err !=3D NULL) { goto out; @@ -440,7 +438,9 @@ static gchar *s390_gdb_arch_name(CPUState *cs) } =20 static Property s390x_cpu_properties[] =3D { +#if !defined(CONFIG_USER_ONLY) DEFINE_PROP_UINT32("core-id", S390CPU, env.core_id, 0), +#endif DEFINE_PROP_END_OF_LIST() }; =20 diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index c57ef71f6d..ff3cc59c02 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -151,8 +151,10 @@ struct CPUS390XState { =20 CPU_COMMON =20 +#if !defined(CONFIG_USER_ONLY) uint32_t core_id; /* PoP "CPU address", same as cpu_index */ uint64_t cpuid; +#endif =20 uint64_t tod_offset; uint64_t tod_basetime; diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 48dd7beddd..07ef8a3b6e 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -945,11 +945,13 @@ void s390_realize_cpu_model(CPUState *cs, Error **err= p) =20 apply_cpu_model(cpu->model, errp); =20 +#if !defined(CONFIG_USER_ONLY) cpu->env.cpuid =3D s390_cpuid_from_cpu_model(cpu->model); if (tcg_enabled()) { /* basic mode, write the cpu address into the first 4 bit of the I= D */ cpu->env.cpuid =3D deposit64(cpu->env.cpuid, 54, 4, cpu->env.core_= id); } +#endif } =20 static void get_feature(Object *obj, Visitor *v, const char *name, --=20 2.13.5 From nobody Sat May 4 15:18:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506606697305707.9949390726265; Thu, 28 Sep 2017 06:51:37 -0700 (PDT) Received: from localhost ([::1]:59319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZDg-0001lR-UV for importer@patchew.org; Thu, 28 Sep 2017 09:51:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxZ9U-0006yj-BN for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxZ9T-0002YA-Ip for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49193) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dxZ9T-0002Xp-9q for qemu-devel@nongnu.org; Thu, 28 Sep 2017 09:46:55 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C109C2D76FE; Thu, 28 Sep 2017 13:46:53 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-191.ams2.redhat.com [10.36.117.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67D098F35E; Thu, 28 Sep 2017 13:46:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C109C2D76FE Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com From: David Hildenbrand To: qemu-devel@nongnu.org Date: Thu, 28 Sep 2017 15:46:09 +0200 Message-Id: <20170928134609.16985-6-david@redhat.com> In-Reply-To: <20170928134609.16985-1-david@redhat.com> References: <20170928134609.16985-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 28 Sep 2017 13:46:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v1 5/5] s390x: introduce and use S390_MAX_CPUS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, David Hildenbrand , cohuck@redhat.com, Richard Henderson , Alexander Graf , Christian Borntraeger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Will be handy in the future. Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 2 +- target/s390x/cpu.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index ab234247f6..dfc107b400 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -421,7 +421,7 @@ static void ccw_machine_class_init(ObjectClass *oc, voi= d *data) mc->no_parallel =3D 1; mc->no_sdcard =3D 1; mc->use_sclp =3D 1; - mc->max_cpus =3D 248; + mc->max_cpus =3D S390_MAX_CPUS; mc->has_hotpluggable_cpus =3D true; mc->get_hotplug_handler =3D s390_get_hotplug_handler; mc->cpu_index_to_instance_props =3D s390_cpu_index_to_props; diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index ff3cc59c02..7e864c8478 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -60,6 +60,8 @@ #define PSW_MCHK_MASK 0x0004000000000000 #define PSW_IO_MASK 0x0200000000000000 =20 +#define S390_MAX_CPUS 248 + typedef struct PSW { uint64_t mask; uint64_t addr; --=20 2.13.5