1. 14 7月, 2017 4 次提交
  2. 05 7月, 2017 1 次提交
  3. 06 6月, 2017 2 次提交
    • C
      s390x/css: fence off MIDA · 4e19b57b
      Cornelia Huck 提交于
      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: NClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
      Reviewed-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      4e19b57b
    • H
      s390x/css: catch section mismatch on load · 8ed179c9
      Halil Pasic 提交于
      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: qemu-stable@nongnu.org
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Reviewed-by: NDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Message-Id: <20170518111405.56947-1-pasic@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      8ed179c9
  4. 19 5月, 2017 4 次提交
  5. 04 5月, 2017 2 次提交
  6. 21 4月, 2017 3 次提交
  7. 20 3月, 2017 1 次提交
    • D
      s390x/css: reassign subchannel if schid is changed after migration · 3c788ebc
      Dong Jia Shi 提交于
      The subchannel is a means to access a device. While the device number is
      assigned by the administrator, the subchannel number is assigned by
      the channel subsystem in an ascending order on cold and hot plug.
      When doing unplug and replug operations, the same device may end up on
      a different subchannel; for example
      
      - We start with a device fe.1.2222, which ends up at subchannel
        fe.1.0000.
      - Now we detach the device, attach a device fe.1.3333 (which would get
        the now-free subchannel fe.1.0000), re-attach fe.1.2222 (which ends
        up at subchannel fe.1.0001) and detach fe.1.3333.
      - We now have the same device (fe.1.2222) available to the guest; it
        just shows up on a different subchannel.
      
      In such a case, the subchannel numbers are different from what a
      QEMU would create during cold plug when parsing the command line.
      
      As this would cause a guest visible change on migration, we do restore
      the source system's value of the subchannel number on load.
      
      So we are now fine from the guest perspective. From the host
      perspective this will cause an inconsistent state in our internal data
      structures, though.
      
      For example, the subchannel 0 might not be at array position 0. This will
      lead to problems when we continue doing hot (un/re) plug operations.
      
      Let's fix this by cleaning up our internal data structures.
      Reported-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      3c788ebc
  8. 24 2月, 2017 1 次提交
  9. 28 9月, 2016 1 次提交
  10. 05 9月, 2016 1 次提交
    • C
      s390x/css: handle cssid 255 correctly · 882b3b97
      Cornelia Huck 提交于
      The cssid 255 is reserved but still valid from an architectural
      point of view. However, feeding a bogus schid of 0xffffffff into
      the virtio hypercall will lead to a crash:
      
      Stack trace of thread 138363:
              #0  0x00000000100d168c css_find_subch (qemu-system-s390x)
              #1  0x00000000100d3290 virtio_ccw_hcall_notify
              #2  0x00000000100cbf60 s390_virtio_hypercall
              #3  0x000000001010ff7a handle_hypercall
              #4  0x0000000010079ed4 kvm_cpu_exec (qemu-system-s390x)
              #5  0x00000000100609b4 qemu_kvm_cpu_thread_fn
              #6  0x000003ff8b887bb4 start_thread (libpthread.so.0)
              #7  0x000003ff8b78df0a thread_start (libc.so.6)
      
      This is because the css array was only allocated for 0..254
      instead of 0..255.
      
      Let's fix this by bumping MAX_CSSID to 255 and fencing off the
      reserved cssid of 255 during css image allocation.
      Reported-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Tested-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      882b3b97
  11. 20 7月, 2016 2 次提交
  12. 12 7月, 2016 1 次提交
  13. 11 7月, 2016 1 次提交
  14. 14 6月, 2016 2 次提交
  15. 19 5月, 2016 1 次提交
  16. 01 3月, 2016 4 次提交
  17. 29 1月, 2016 1 次提交
  18. 27 1月, 2016 2 次提交
  19. 11 1月, 2016 1 次提交
  20. 12 11月, 2015 1 次提交
  21. 07 9月, 2015 3 次提交
  22. 30 6月, 2015 1 次提交