1. 20 10月, 2017 7 次提交
  2. 06 10月, 2017 4 次提交
  3. 27 9月, 2017 1 次提交
  4. 20 9月, 2017 4 次提交
    • H
      s390x/css: remove unused error handling branch · ce4a4453
      Halil Pasic 提交于
      The case in question actually never happens. Let us get rid of the dead
      code.
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Message-Id: <20170908152446.14606-4-pasic@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      ce4a4453
    • H
      s390x/css: fix NULL handling for CCW addresses · cc6a9f8d
      Halil Pasic 提交于
      Back then in the time of df1fe5bb ("s390: Virtual channel subsystem
      support.", 2013-01-24) -EIO used to map to a channel-program check (via
      the default label of the switch statement).  Then 2dc95b4c
      ("s390x/3270: 3270 data stream handling", 2016-04-01) came along
      and that changed dramatically.
      
      Let us roll back this undesired side effect, and go back to
      channel-program check.
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Fixes: 2dc95b4c "s390x/3270: 3270 data stream handling"
      Message-Id: <20170908152446.14606-3-pasic@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      cc6a9f8d
    • H
      s390x/css: drop data-check in interpretation · 248b920d
      Halil Pasic 提交于
      The architecture says that channel-data check is indicating that
      an uncorrected storage (memory) error has been detected in regard
      to the data residing in main storage (memory) that is currently
      used for an I/O operation. The described detection is done using
      the CBC technology.
      
      The ccw interpretation code is however generating a channel-data check
      effectively when the (device specific) ccw_cb returns -EFAULT.  In case
      of virtio-ccw devices this happens when mapping memory fails, or when a
      NULL pointer is encountered. So this behavior is not architecture
      conform.
      
      Furthermore the best fit for these situations (null pointer, mapping a
      piece of guest memory fails) from architectural perspective the condition
      described as the channel subsystem refers to a location that is not
      available, which when encountered shall result in a channel-program
      check.
      
      To fix this, all we have to do is to get rid of the switch case matching
      -EFAULT: the default is generating a channel-program check.
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Message-Id: <20170908152446.14606-2-pasic@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      248b920d
    • H
      s390x/css: fix cc handling for XSCH · 6c864622
      Halil Pasic 提交于
      The function ioinst_handle_xsch is presenting cc 2 when it's supposed to
      present cc 1 and the other way around, because css_do_xsch has the error
      codes mixed up. Because cc 1 has precedence over cc 2 we also have to
      swap the two checks.
      
      Let us fix this.
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Reported-by: NPierre Morel <pmorel@linux.vnet.ibm.com>
      Message-Id: <20170831121828.85885-1-pasic@linux.vnet.ibm.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      6c864622
  5. 31 8月, 2017 2 次提交
  6. 28 7月, 2017 2 次提交
    • H
      s390x/css: fix bits must be zero check for TIC · 4add0da6
      Halil Pasic 提交于
      According to the PoP bit positions 0-3 and 8-32 of the format-1 CCW must
      contain zeros.  Bits 0-3 are already covered by cmd_code validity
      checking, and bit 32 is covered by the CCW address checking.
      
      Bits 8-31 correspond to CCW1.flags and CCW1.count.  Currently we only
      check for the absence of certain flags.  Let's fix this.
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Message-Id: <20170725224442.13383-3-pasic@linux.vnet.ibm.com>
      Reviewed-by: NDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
      [CH: tweaked comment]
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      4add0da6
    • H
      s390x/css: check ccw address validity · 198c0d1f
      Halil Pasic 提交于
      According to the PoP channel command words (CCW) must be doubleword
      aligned and 31 bit addressable for format 1 and 24 bit addressable for
      format 0 CCWs.
      
      If the channel subsystem encounters a ccw address which does not satisfy
      this alignment requirement a program-check condition is recognised.
      
      The situation with 31 bit addressable is a bit more complicated: both the
      ORB and a format 1 CCW TIC hold the address of (the rest of) the channel
      program, that is the address of the next CCW in a word, and the PoP
      mandates that bit 0 of that word shall be zero -- or a program-check
      condition is to be recognized -- and does not belong to the field holding
      the ccw address.
      
      Since in code the corresponding fields span across the whole word (unlike
      in PoP where these are defined as 31 bit wide) we can check this by
      applying a mask. The 24 addressable case isn't affecting TIC because the
      address is composed of a halfword and a byte portion (no additional zero
      bit requirements) and just slightly complicates the ORB case where also
      bits 1-7 need to be zero.
      
      The same requirements (especially n-bit addressability) apply to the
      ccw addresses generated while chaining.
      
      Let's make our CSS implementation follow the AR more closely.
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Message-Id: <20170727154842.23427-1-pasic@linux.vnet.ibm.com>
      Reviewed-by: NDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      198c0d1f
  7. 14 7月, 2017 8 次提交
  8. 05 7月, 2017 1 次提交
  9. 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
  10. 19 5月, 2017 4 次提交
  11. 04 5月, 2017 2 次提交
  12. 21 4月, 2017 3 次提交