* [Qemu-devel] [PATCH] Revert "s390x/ccw: create s390 phb conditionally"
@ 2017-09-28 13:18 Christian Borntraeger
2017-09-28 13:47 ` David Hildenbrand
2017-09-28 14:15 ` Cornelia Huck
0 siblings, 2 replies; 3+ messages in thread
From: Christian Borntraeger @ 2017-09-28 13:18 UTC (permalink / raw)
To: Cornelia Huck
Cc: qemu-devel, Alexander Graf, Thomas Huth, David Hildenbrand,
Richard Henderson, Christian Borntraeger
This reverts commit d32bd032d8fde41281aae34c16a4aa97e9acfeac.
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>
---
hw/s390x/s390-virtio-ccw.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index b6aa2da..a77336f 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -275,6 +275,7 @@ static void ccw_init(MachineState *machine)
{
int ret;
VirtualCssBus *css_bus;
+ DeviceState *dev;
s390_sclp_init();
s390_memory_init(machine->ram_size);
@@ -290,13 +291,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();
--
2.9.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "s390x/ccw: create s390 phb conditionally"
2017-09-28 13:18 [Qemu-devel] [PATCH] Revert "s390x/ccw: create s390 phb conditionally" Christian Borntraeger
@ 2017-09-28 13:47 ` David Hildenbrand
2017-09-28 14:15 ` Cornelia Huck
1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2017-09-28 13:47 UTC (permalink / raw)
To: Christian Borntraeger, Cornelia Huck
Cc: qemu-devel, Alexander Graf, Thomas Huth, Richard Henderson
On 28.09.2017 15:18, Christian Borntraeger wrote:
> This reverts commit d32bd032d8fde41281aae34c16a4aa97e9acfeac.
>
> 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>
> ---
> hw/s390x/s390-virtio-ccw.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index b6aa2da..a77336f 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -275,6 +275,7 @@ static void ccw_init(MachineState *machine)
> {
> int ret;
> VirtualCssBus *css_bus;
> + DeviceState *dev;
>
> s390_sclp_init();
> s390_memory_init(machine->ram_size);
> @@ -290,13 +291,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();
>
This zPCI stuff is just nasty.
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "s390x/ccw: create s390 phb conditionally"
2017-09-28 13:18 [Qemu-devel] [PATCH] Revert "s390x/ccw: create s390 phb conditionally" Christian Borntraeger
2017-09-28 13:47 ` David Hildenbrand
@ 2017-09-28 14:15 ` Cornelia Huck
1 sibling, 0 replies; 3+ messages in thread
From: Cornelia Huck @ 2017-09-28 14:15 UTC (permalink / raw)
To: Christian Borntraeger
Cc: qemu-devel, Alexander Graf, Thomas Huth, David Hildenbrand,
Richard Henderson
On Thu, 28 Sep 2017 15:18:31 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> This reverts commit d32bd032d8fde41281aae34c16a4aa97e9acfeac.
>
> 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>
> ---
> hw/s390x/s390-virtio-ccw.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index b6aa2da..a77336f 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -275,6 +275,7 @@ static void ccw_init(MachineState *machine)
> {
> int ret;
> VirtualCssBus *css_bus;
> + DeviceState *dev;
>
> s390_sclp_init();
> s390_memory_init(machine->ram_size);
> @@ -290,13 +291,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
Added the missing trailing period.
> + */
> + 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();
Thanks, applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-28 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-28 13:18 [Qemu-devel] [PATCH] Revert "s390x/ccw: create s390 phb conditionally" Christian Borntraeger
2017-09-28 13:47 ` David Hildenbrand
2017-09-28 14:15 ` Cornelia Huck
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.