1. 20 8月, 2018 1 次提交
  2. 18 6月, 2018 2 次提交
  3. 14 5月, 2018 1 次提交
  4. 09 2月, 2018 1 次提交
  5. 18 12月, 2017 1 次提交
  6. 15 12月, 2017 2 次提交
    • H
      s390x/css: unrestrict cssids · 99577c49
      Halil Pasic 提交于
      The default css 0xfe is currently restricted to virtual subchannel
      devices. The hope when the decision was made was, that non-virtual
      subchannel devices will come around when guest can exploit multiple
      channel subsystems. Since the guests generally don't do, the pain
      of the partitioned (cssid) namespace outweighs the gain.
      
      Let us remove the corresponding restrictions (virtual devices
      can be put only in 0xfe and non-virtual devices in any css except
      the 0xfe -- while s390-squash-mcss then remaps everything to cssid 0).
      
      At the same time, change our schema for generating css bus ids to put
      both virtual and non-virtual devices into the default css (spilling over
      into other css images, if needed). The intention is to deprecate
      s390-squash-mcss. With this change devices without a specified devno
      won't end up hidden to guests not supporting multiple channel subsystems,
      unless this can not be avoided (default css full).
      
      Let us also advertise the changes to the management software (so it can
      tell are cssids unrestricted or restricted).
      
      The adverse effect of getting rid of the restriction on migration should
      not be too severe.  Vfio-ccw devices are not live-migratable yet, and for
      virtual devices using the extra freedom would only make sense with the
      aforementioned guest support in place.
      
      The auto-generated bus ids are affected by both changes. We hope to not
      encounter any auto-generated bus ids in production as Libvirt is always
      explicit about the bus id.  Since 8ed179c9 ("s390x/css: catch section
      mismatch on load", 2017-05-18) the worst that can happen because the same
      device ended up having a different bus id is a cleanly failed migration.
      I find it hard to reason about the impact of changed auto-generated bus
      ids on migration for command line users as I don't know which rules is
      such an user supposed to follow.
      
      Another pain-point is down- or upgrade of QEMU for command line users.
      The old way and the new way of doing vfio-ccw are mutually incompatible.
      Libvirt is only going to support the new way, so for libvirt users, the
      possible problems at QEMU downgrade are the following. If a domain
      contains virtual devices placed into a css different than 0xfe the domain
      will refuse to start with a QEMU not having this patch. Putting devices
      into a css different that 0xfe however won't make much sense in the near
      future (guest support). Libvirt will refuse to do vfio-ccw with a QEMU
      not having this patch. This is business as usual.
      Signed-off-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
      Message-Id: <20171206144438.28908-2-pasic@linux.vnet.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      99577c49
    • D
      s390x/tcg: rip out dead tpi code · fc21eb6b
      David Hildenbrand 提交于
      It is broken and not even wired up. We'll add a new handler soon, but
      that will live somewhere else.
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20171130162744.25442-4-david@redhat.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      fc21eb6b
  7. 20 10月, 2017 7 次提交
  8. 06 10月, 2017 4 次提交
  9. 27 9月, 2017 1 次提交
  10. 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
  11. 31 8月, 2017 2 次提交
  12. 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
  13. 14 7月, 2017 8 次提交
  14. 05 7月, 2017 1 次提交
  15. 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
  16. 19 5月, 2017 1 次提交