qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: peter.maydell@linaro.org
Cc: agraf@suse.de, Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com,
	"Jason J. Herne" <jjherne@linux.vnet.ibm.com>,
	Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>,
	Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: [Qemu-devel] [PULL for-2.4 11/11] s390x/migration: Introduce 2.4 machine
Date: Thu,  2 Jul 2015 09:42:25 +0200	[thread overview]
Message-ID: <1435822945-30232-12-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1435822945-30232-1-git-send-email-cornelia.huck@de.ibm.com>

From: Christian Borntraeger <borntraeger@de.ibm.com>

The section footer changes commit f68945d42bab ("Add a protective
section footer") and commit 37fb569c0198 ("Disable section footers
on older machine types") broke migration for any non-versioned
machines.

This pinpoints a problem of s390-ccw machines: it needs to
be versioned to be compatible with future changes in common
code data structures such as section footers.

Let's introduce a version scheme for s390-ccw-virtio machines.
We will use the old s390-ccw-virtio name as alias to the latest
version as all existing libvirt XML for the ccw type were expanded
by libvirt to that name.

The only downside of this patch is, that the old alias s390-ccw
will no longer be available as machines can have only one alias,
but it should not really matter.

Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Cc: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Cc: Jason J. Herne <jjherne@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <1435742217-62246-1-git-send-email-borntraeger@de.ibm.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index c574988..3d20d6a 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -204,9 +204,6 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
     MachineClass *mc = MACHINE_CLASS(oc);
     NMIClass *nc = NMI_CLASS(oc);
 
-    mc->name = "s390-ccw-virtio";
-    mc->alias = "s390-ccw";
-    mc->desc = "VirtIO-ccw based S390 machine";
     mc->init = ccw_init;
     mc->block_default_type = IF_VIRTIO;
     mc->no_cdrom = 1;
@@ -216,7 +213,6 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
     mc->no_sdcard = 1;
     mc->use_sclp = 1;
     mc->max_cpus = 255;
-    mc->is_default = 1;
     nc->nmi_monitor_handler = s390_nmi;
 }
 
@@ -272,6 +268,7 @@ static inline void s390_machine_initfn(Object *obj)
 static const TypeInfo ccw_machine_info = {
     .name          = TYPE_S390_CCW_MACHINE,
     .parent        = TYPE_MACHINE,
+    .abstract      = true,
     .instance_size = sizeof(S390CcwMachineState),
     .instance_init = s390_machine_initfn,
     .class_init    = ccw_machine_class_init,
@@ -281,9 +278,26 @@ static const TypeInfo ccw_machine_info = {
     },
 };
 
+static void ccw_machine_2_4_class_init(ObjectClass *oc, void *data)
+{
+    MachineClass *mc = MACHINE_CLASS(oc);
+
+    mc->name = "s390-ccw-virtio-2.4";
+    mc->alias = "s390-ccw-virtio";
+    mc->desc = "VirtIO-ccw based S390 machine v2.4";
+    mc->is_default = 1;
+}
+
+static const TypeInfo ccw_machine_2_4_info = {
+    .name          = TYPE_S390_CCW_MACHINE "2.4",
+    .parent        = TYPE_S390_CCW_MACHINE,
+    .class_init    = ccw_machine_2_4_class_init,
+};
+
 static void ccw_machine_register_types(void)
 {
     type_register_static(&ccw_machine_info);
+    type_register_static(&ccw_machine_2_4_info);
 }
 
 type_init(ccw_machine_register_types)
-- 
2.4.5

  parent reply	other threads:[~2015-07-02  7:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02  7:42 [Qemu-devel] [PULL for-2.4 00/11] s390x patches for 2.4 Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 01/11] virtio-ccw: complete handling of guest-initiated resets Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 02/11] css: mss/mcss-e vs. migration Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 03/11] s390-ccw.img: Consume service interrupts Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 04/11] s390-ccw.img: update Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 05/11] s390x/css: Add a callback for when subchannel gets disabled Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 06/11] s390x/virtio-ccw: add virtio set-revision call Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 07/11] s390x/virtio-ccw: support virtio-1 set_vq format Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 08/11] virtio-ccw: migrate ->revision Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 09/11] s390x/ipl: Fix boot if no bootindex was specified Cornelia Huck
2015-07-02  7:42 ` [Qemu-devel] [PULL for-2.4 10/11] s390x/gdb: synchronize cpu state after modifying acrs Cornelia Huck
2015-07-02  7:42 ` Cornelia Huck [this message]
2015-07-02  9:44 ` [Qemu-devel] [PULL for-2.4 00/11] s390x patches for 2.4 Peter Maydell
2015-07-02  9:52   ` 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=1435822945-30232-12-git-send-email-cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=fiuczy@linux.vnet.ibm.com \
    --cc=jfrei@linux.vnet.ibm.com \
    --cc=jjherne@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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).