From: David Hildenbrand <david@redhat.com>
To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cohuck@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Alexander Graf <agraf@suse.de>,
David Hildenbrand <david@redhat.com>
Subject: [Qemu-devel] [PATCH v1] s390x/cpumodel: make qemu cpu model play with "none" machine
Date: Wed, 13 Dec 2017 14:24:07 +0100 [thread overview]
Message-ID: <20171213132407.5227-1-david@redhat.com> (raw)
In-Reply-To: <20171208165529.14124-1-david@redhat.com>
Make sure "-cpu qemu" works with "-M none".
Signed-off-by: David Hildenbrand <david@redhat.com>
---
Conny, if this is okay, can you squash with the original patch?
hw/s390x/s390-virtio-ccw.c | 4 ----
target/s390x/cpu_models.c | 7 +++++--
target/s390x/gen-features.c | 4 ++--
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index c1f96418fa..466e45343c 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -725,10 +725,6 @@ bool css_migration_enabled(void)
static void ccw_machine_2_12_instance_options(MachineState *machine)
{
- static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V2_12 };
-
- /* with 2.12 we emulated a stripped down zEC12 (GA 2) */
- s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat);
}
static void ccw_machine_2_12_class_options(MachineClass *mc)
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 7404ef52c6..212a5f0697 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -1122,8 +1122,6 @@ static void s390_qemu_cpu_model_initfn(Object *obj)
S390CPU *cpu = S390_CPU(obj);
cpu->model = g_malloc0(sizeof(*cpu->model));
- /* has to be initialized by now via s390_set_qemu_cpu_model() */
- g_assert(s390_qemu_cpu_model.def);
/* copy the CPU model so we can modify it */
memcpy(cpu->model, &s390_qemu_cpu_model, sizeof(*cpu->model));
}
@@ -1266,6 +1264,7 @@ static void init_ignored_base_feat(void)
static void register_types(void)
{
+ static const S390FeatInit qemu_latest_init = { S390_FEAT_LIST_QEMU_LATEST };
int i;
init_ignored_base_feat();
@@ -1281,6 +1280,10 @@ static void register_types(void)
s390_cpu_defs[i].full_feat);
}
+ /* initialize the qemu model with latest definition */
+ s390_set_qemu_cpu_model(QEMU_MAX_CPU_TYPE, QEMU_MAX_CPU_GEN,
+ QEMU_MAX_CPU_EC_GA, qemu_latest_init);
+
for (i = 0; i < ARRAY_SIZE(s390_cpu_defs); i++) {
char *base_name = s390_base_cpu_type_name(s390_cpu_defs[i].name);
TypeInfo ti_base = {
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index 983f2dcd52..deace660e1 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -544,7 +544,7 @@ static uint16_t qemu_V2_11[] = {
S390_FEAT_ZARCH,
};
-static uint16_t qemu_V2_12[] = {
+static uint16_t qemu_LATEST[] = {
S390_FEAT_DAT_ENH,
S390_FEAT_IDTE_SEGMENT,
S390_FEAT_STFLE,
@@ -685,7 +685,7 @@ static FeatGroupDefSpec FeatGroupDef[] = {
*******************************/
static FeatGroupDefSpec QemuFeatDef[] = {
QEMU_FEAT_INITIALIZER(V2_11),
- QEMU_FEAT_INITIALIZER(V2_12),
+ QEMU_FEAT_INITIALIZER(LATEST),
QEMU_FEAT_INITIALIZER(MAX),
};
--
2.14.3
next prev parent reply other threads:[~2017-12-13 13:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 16:01 [Qemu-devel] [PATCH v3 for-2.12 00/14] s390x/tcg: CCW hotplug, facilities, instructions David Hildenbrand
2017-12-08 16:01 ` [Qemu-devel] [PATCH v3 for-2.12 01/14] s390x/kvm: factor out build_channel_report_mcic() into cpu.h David Hildenbrand
2017-12-09 2:17 ` Richard Henderson
2017-12-08 16:01 ` [Qemu-devel] [PATCH v3 for-2.12 02/14] s390x/tcg: fix and cleanup mcck injection David Hildenbrand
2017-12-08 16:01 ` [Qemu-devel] [PATCH v3 for-2.12 03/14] s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD David Hildenbrand
2017-12-09 2:20 ` Richard Henderson
2017-12-08 16:01 ` [Qemu-devel] [PATCH v3 for-2.12 04/14] s390x/tcg: indicate value of TODPR in STCKE David Hildenbrand
2017-12-08 16:01 ` [Qemu-devel] [PATCH v3 for-2.12 05/14] s390x/tcg: wire up STORE CHANNEL REPORT WORD David Hildenbrand
2017-12-08 16:01 ` [Qemu-devel] [PATCH v3 for-2.12 06/14] s390x/tcg: ASI/ASGI/ALSI/ALSGI are atomic with Interlocked-acccess facility 1 David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 07/14] s390x/tcg: implement Interlocked-Access Facility 2 David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 08/14] s390x/tcg: wire up SET ADDRESS LIMIT David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 09/14] s390x/tcg: wire up SET CHANNEL MONITOR David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 10/14] s390x/tcg: Implement STORE CHANNEL PATH STATUS David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 11/14] s390x/tcg: Implement SIGNAL ADAPTER instruction David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 12/14] s390x/tcg: implement extract-CPU-time facility David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 13/14] s390x/tcg: we already implement the Set-Program-Parameter facility David Hildenbrand
2017-12-08 16:02 ` [Qemu-devel] [PATCH v3 for-2.12 14/14] s390x: change the QEMU cpu model to a stripped down z12 David Hildenbrand
2017-12-08 16:26 ` Cornelia Huck
2017-12-08 16:29 ` David Hildenbrand
2017-12-08 16:34 ` Daniel P. Berrange
2017-12-08 16:39 ` David Hildenbrand
2017-12-08 16:55 ` [Qemu-devel] [PATCH v4 for-2-12] " David Hildenbrand
2017-12-13 13:24 ` David Hildenbrand [this message]
2017-12-13 13:34 ` [Qemu-devel] [qemu-s390x] [PATCH v1] s390x/cpumodel: make qemu cpu model play with "none" machine Christian Borntraeger
2017-12-13 13:38 ` David Hildenbrand
2017-12-13 17:17 ` [Qemu-devel] " Cornelia Huck
2017-12-14 12:18 ` Cornelia Huck
2017-12-13 17:15 ` [Qemu-devel] [PATCH v1] s390x/tcg: don't include z13 features in the qemu model David Hildenbrand
2017-12-13 17:21 ` Cornelia Huck
2017-12-14 12:19 ` Cornelia Huck
2017-12-11 10:13 ` [Qemu-devel] [PATCH v3 for-2.12 00/14] s390x/tcg: CCW hotplug, facilities, instructions Cornelia Huck
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=20171213132407.5227-1-david@redhat.com \
--to=david@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.