Skip to content

Commit

Permalink
Revert "s390x/ccw: create s390 phb conditionally"
Browse files Browse the repository at this point in the history
This reverts commit d32bd03.

Turns out that old QEMUs always created a pci host bridge
and for many CPU models the migration from old QEMUs to new
QEMUs will fail with
qemu-system-s390x: Unknown savevm section or instance 'PCIBUS' 0
qemu-system-s390x: load of migration failed: Invalid argument

As a quick fix we will revert the commit and always create the
pci host bridge.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[fixed revert to keep the comment fixup, added a comment in the code]
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Message-Id: <20170928131831.81393-1-borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
  • Loading branch information
borntraeger authored and cohuck committed Oct 6, 2017
1 parent 8eb82de commit c1843e2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions hw/s390x/s390-virtio-ccw.c
Expand Up @@ -251,6 +251,7 @@ static void ccw_init(MachineState *machine)
{
int ret;
VirtualCssBus *css_bus;
DeviceState *dev;

s390_sclp_init();
s390_memory_init(machine->ram_size);
Expand All @@ -266,13 +267,14 @@ static void ccw_init(MachineState *machine)
machine->initrd_filename, "s390-ccw.img",
"s390-netboot.img", true);

if (s390_has_feat(S390_FEAT_ZPCI)) {
DeviceState *dev = qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE);
object_property_add_child(qdev_get_machine(),
TYPE_S390_PCI_HOST_BRIDGE,
OBJECT(dev), NULL);
qdev_init_nofail(dev);
}
/*
* We cannot easily make the pci host bridge conditional as older QEMUs
* always created it. Doing so would break migration across QEMU versions.
*/
dev = qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE);
object_property_add_child(qdev_get_machine(), TYPE_S390_PCI_HOST_BRIDGE,
OBJECT(dev), NULL);
qdev_init_nofail(dev);

/* register hypercalls */
virtio_ccw_register_hcalls();
Expand Down

0 comments on commit c1843e2

Please sign in to comment.