qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 8ed179: s390x/css: catch section mismatch on


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 8ed179: s390x/css: catch section mismatch on load
Date: Tue, 13 Jun 2017 02:37:31 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 8ed179c937830143dc0e03daac30a55272ed89e3
      
https://github.com/qemu/qemu/commit/8ed179c937830143dc0e03daac30a55272ed89e3
  Author: Halil Pasic <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M hw/s390x/css.c
    M hw/s390x/virtio-ccw.c

  Log Message:
  -----------
  s390x/css: catch section mismatch on load

Prior to the virtio-ccw-2.7 machine (and commit 2a79eb1a), our virtio
devices residing under the virtual-css bus do not have qdev_path based
migration stream identifiers (because their qdev_path is NULL). The ids
are instead generated when the device is registered as a composition of
the so called idstr, which takes the vmsd name as its value, and an
instance_id, which is which is calculated as a maximal instance_id
registered with the same idstr plus one, or zero (if none was registered
previously).

That means, under certain circumstances, one device might try, and even
succeed, to load the state of a different device. This can lead to
trouble.

Let us fail the migration if the above problem is detected during load.

How to reproduce the problem:
1) start qemu-system-s390x making sure you have the following devices
   defined on your command line:
     -device virtio-rng-ccw,id=rng1,devno=fe.0.0001
     -device virtio-rng-ccw,id=rng2,devno=fe.0.0002
2) detach the devices and reattach in reverse order using the monitor:
     (qemu) device_del rng1
     (qemu) device_del rng2
     (qemu) device_add virtio-rng-ccw,id=rng2,devno=fe.0.0002
     (qemu) device_add virtio-rng-ccw,id=rng1,devno=fe.0.0001
3) save the state of the vm into a temporary file and quit QEMU:
     (qemu) migrate "exec:gzip -c > /tmp/tmp_vmstate.gz"
     (qemu) q
4) use your command line from step 1 with
     -incoming "exec:gzip -c -d /tmp/tmp_vmstate.gz"
   appended to reproduce the problem (while trying to to load the saved vm)

CC: address@hidden
Signed-off-by: Halil Pasic <address@hidden>
Reviewed-by: Dong Jia Shi <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>


  Commit: 4e19b57b0e335fdaf2cf3f056b327ee6717dec7e
      
https://github.com/qemu/qemu/commit/4e19b57b0e335fdaf2cf3f056b327ee6717dec7e
  Author: Cornelia Huck <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M hw/s390x/css.c
    M include/hw/s390x/ioinst.h
    M target/s390x/ioinst.c

  Log Message:
  -----------
  s390x/css: fence off MIDA

MIDA (modified indirect data addressing) is an optional facility, and
we (currently) don't support it. Let's post an operand exception if
the guest tries to set it in the orb and a channel program check
if it is set in a ccw, as specified in the Principles of Operation.

Reviewed-by: Claudio Imbrenda <address@hidden>
Reviewed-by: Halil Pasic <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>


  Commit: c68f4503e08ea54405660897fba7c125d3953021
      
https://github.com/qemu/qemu/commit/c68f4503e08ea54405660897fba7c125d3953021
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M pc-bios/s390-ccw/Makefile

  Log Message:
  -----------
  pc-bios/s390-ccw: use STRIP variable in Makefile

The address@hidden target fails with:

strip --strip-unneeded s390-ccw.elf -o s390-ccw.img
strip: Unable to recognise the format of the input file `s390-ccw.elf'

The configure script defines a STRIP makefile variable whose default
value is ${cross_prefix}strip. Let's use it.

We default to using the non-prefixed strip command in case --enable-debug
or --disable-strip was passed to configure during a regular build.

Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>


  Commit: 64bc98f4b97d4757b4ca42ccfc27397e09302fbd
      
https://github.com/qemu/qemu/commit/64bc98f4b97d4757b4ca42ccfc27397e09302fbd
  Author: David Hildenbrand <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M target/s390x/cpu_models.c
    M target/s390x/cpu_models.h
    M target/s390x/kvm.c

  Log Message:
  -----------
  s390x/cpumodel: take care of the cpuid format bit for KVM

Let's also properly forward that bit. It should always be set. I
verified it under z/VM, it seems to be always set there. For now,
zKVM guests never get that bit set when the CPU model is active.

The PoP mentiones, that z800 + z900 (HW generation 7) always set this
bit to 0, so let's take care of that.

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Acked-by: Jason J. Herne <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>


  Commit: fbe8202ea81519a42855830059ccc8e10b58dfa5
      
https://github.com/qemu/qemu/commit/fbe8202ea81519a42855830059ccc8e10b58dfa5
  Author: David Hildenbrand <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  s390x/cpumodel: improve defintion search without an IBC

Currently, under z/VM on a 0x2827, QEMU will detect a 0x2828 if no
IBC value is provided. QEMU will simply take the last model of that HW
generation, which happens to be the BC version.

Let's improve our search for that case by selecting the latest CPU
definition that matches the CPU type. This for example will avoid
detecting an z13 as a z13s.

We might still detect a GA2 version on a GA1 system, but as we don't
have further information at hand, there isn't too much we can do about
it. The alternative of always presenting the oldest GA is not backward
compatible, e.g:
You're running on 0x2827 GA2.
Old QEMU version indicated "0x2828 GA1 == 0x2827 GA2". After you updated
QEMU, you suddenly detect "0x2827 GA1". You're previous libvirt guest
might suddenly refuse to run.

In the end presenting a newer GA level does not matter because:

1: All GAX models share the same base feature set. A GAX++ might
support "more features".
2: Without an IBC, the guest can't detect the GA version.

If we have no IBC (esp. unblocked_ibc == 0), the IBC we will present
to the guest in read_SCP_info() will be 0. The guest will not know
which GA version it has. The problem of missing IBC propagates.

If we don't have a feature of the GA++ version, also our guest won't
have it. So in summary, the guest also has no idea of its GA version.

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Acked-by: Jason J. Herne <address@hidden>
Reviewed-by: Halil Pasic <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
[improve patch description by reusing mailing list discussion]


  Commit: f4f3082b0c35b5aa84616dc2dc8c9c0aac2d6a1c
      
https://github.com/qemu/qemu/commit/f4f3082b0c35b5aa84616dc2dc8c9c0aac2d6a1c
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M hw/s390x/css.c
    M hw/s390x/virtio-ccw.c
    M include/hw/s390x/ioinst.h
    M pc-bios/s390-ccw/Makefile
    M target/s390x/cpu_models.c
    M target/s390x/cpu_models.h
    M target/s390x/ioinst.c
    M target/s390x/kvm.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20170608' into 
staging

s390x: misc fixes

bunch of fixes
- reject MIDA accesses for CCWs
- cpumodel fixes
- cross-build fix for bios
- migration improvements

# gpg: Signature made Thu 08 Jun 2017 14:10:29 BST
# gpg:                using RSA key 0x117BBC80B5A61C7C
# gpg: Good signature from "Christian Borntraeger (IBM) <address@hidden>"
# Primary key fingerprint: F922 9381 A334 08F9 DBAB  FBCA 117B BC80 B5A6 1C7C

* remotes/borntraeger/tags/s390x-20170608:
  s390x/cpumodel: improve defintion search without an IBC
  s390x/cpumodel: take care of the cpuid format bit for KVM
  pc-bios/s390-ccw: use STRIP variable in Makefile
  s390x/css: fence off MIDA
  s390x/css: catch section mismatch on load

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/9bba618f18b1...f4f3082b0c35

reply via email to

[Prev in Thread] Current Thread [Next in Thread]