Skip to content

Commit

Permalink
s390x/css: fix css migration compat handling
Browse files Browse the repository at this point in the history
Commit e996583 ("s390x/css: activate ChannelSubSys migration",
2017-07-11) was supposed to enable css migration for virtio-ccw
machines starting 2.10, but it ended up effectively enabling it
only for 2.10 as the registration of the appropriate VMStateDescription
happens in ccw_machine_2_10_instance_options which does not get
called for machines more recent than 2_10.

Let us move the corresponding chunk of code (which conditionally enables
the migration based on the value of the corresponding class property) to
ccw_init, which is called for each virtio-ccw machine instance.

Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20171004110109.16525-1-pasic@linux.vnet.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
  • Loading branch information
Halil Pasic authored and cohuck committed Oct 6, 2017
1 parent bd2aef1 commit 489c909
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/s390x/s390-virtio-ccw.c
Expand Up @@ -291,6 +291,9 @@ static void ccw_init(MachineState *machine)
ret = css_create_css_image(VIRTUAL_CSSID, true);
}
assert(ret == 0);
if (css_migration_enabled()) {
css_register_vmstate();
}

/* Create VirtIO network adapters */
s390_create_virtio_net(BUS(css_bus), "virtio-net-ccw");
Expand Down Expand Up @@ -715,9 +718,6 @@ DEFINE_CCW_MACHINE(2_11, "2.11", true);
static void ccw_machine_2_10_instance_options(MachineState *machine)
{
ccw_machine_2_11_instance_options(machine);
if (css_migration_enabled()) {
css_register_vmstate();
}
}

static void ccw_machine_2_10_class_options(MachineClass *mc)
Expand Down

0 comments on commit 489c909

Please sign in to comment.