1. 23 3月, 2017 1 次提交
  2. 16 3月, 2017 1 次提交
    • D
      KVM: s390: use defines for execution controls · 0c9d8683
      David Hildenbrand 提交于
      Let's replace the bitmasks by defines. Reconstructed from code, comments
      and commit messages.
      
      Tried to keep the defines short and map them to feature names. In case
      they don't completely map to features, keep them in the stye of ICTL
      defines.
      
      This effectively drops all "U" from the existing numbers. I think this
      should be fine (as similarly done for e.g. ICTL defines).
      
      I am not 100% sure about the ECA_MVPGI and ECA_PROTEXCI bits as they are
      always used in pairs.
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20170313104828.13362-1-david@redhat.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      [some renames, add one missing place]
      0c9d8683
  3. 30 1月, 2017 2 次提交
  4. 08 9月, 2016 3 次提交
  5. 05 7月, 2016 1 次提交
  6. 21 6月, 2016 3 次提交
  7. 10 6月, 2016 2 次提交
    • D
      KVM: s390: interface to query and configure cpu features · 15c9705f
      David Hildenbrand 提交于
      For now, we only have an interface to query and configure facilities
      indicated via STFL(E). However, we also have features indicated via
      SCLP, that have to be indicated to the guest by user space and usually
      require KVM support.
      
      This patch allows user space to query and configure available cpu features
      for the guest.
      
      Please note that disabling a feature doesn't necessarily mean that it is
      completely disabled (e.g. ESOP is mostly handled by the SIE). We will try
      our best to disable it.
      
      Most features (e.g. SCLP) can't directly be forwarded, as most of them need
      in addition to hardware support, support in KVM. As we later on want to
      turn these features in KVM explicitly on/off (to simulate different
      behavior), we have to filter all features provided by the hardware and
      make them configurable.
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      15c9705f
    • J
      KVM: s390: Add sthyi emulation · 95ca2cb5
      Janosch Frank 提交于
      Store Hypervisor Information is an emulated z/VM instruction that
      provides a guest with basic information about the layers it is running
      on. This includes information about the cpu configuration of both the
      machine and the lpar, as well as their names, machine model and
      machine type. This information enables an application to determine the
      maximum capacity of CPs and IFLs available to software.
      
      The instruction is available whenever the facility bit 74 is set,
      otherwise executing it results in an operation exception.
      
      It is important to check the validity flags in the sections before
      using data from any structure member. It is not guaranteed that all
      members will be valid on all machines / machine configurations.
      Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com>
      Reviewed-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      95ca2cb5
  8. 08 3月, 2016 3 次提交
  9. 10 2月, 2016 1 次提交
    • D
      KVM: s390: PSW forwarding / rewinding / ilc rework · 0e8bc06a
      David Hildenbrand 提交于
      We have some confusion about ilc vs. ilen in our current code. So let's
      correctly use the term ilen when dealing with (ilc << 1).
      
      Program irq injection didn't take care of the correct ilc in case of
      irqs triggered by EXECUTE functions, let's provide one function
      kvm_s390_get_ilen() to take care of all that.
      
      Also, manually specifying in intercept handlers the size of the
      instruction (and sometimes overwriting that value for EXECUTE internally)
      doesn't make too much sense. So also provide the functions:
      - kvm_s390_retry_instr to retry the currently intercepted instruction
      - kvm_s390_rewind_psw to rewind the PSW without internal overwrites
      - kvm_s390_forward_psw to forward the PSW
      Reviewed-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      0e8bc06a
  10. 30 11月, 2015 2 次提交
  11. 13 10月, 2015 3 次提交
  12. 29 7月, 2015 3 次提交
  13. 08 5月, 2015 2 次提交
  14. 01 4月, 2015 2 次提交
    • J
      KVM: s390: migrate vcpu interrupt state · 816c7667
      Jens Freimann 提交于
      This patch adds support to migrate vcpu interrupts. Two new vcpu ioctls
      are added which get/set the complete status of pending interrupts in one
      go. The ioctls are marked as available with the new capability
      KVM_CAP_S390_IRQ_STATE.
      
      We can not use a ONEREG, as the number of pending local interrupts is not
      constant and depends on the number of CPUs.
      
      To retrieve the interrupt state we add an ioctl KVM_S390_GET_IRQ_STATE.
      Its input parameter is a pointer to a struct kvm_s390_irq_state which
      has a buffer and length.  For all currently pending interrupts, we copy
      a struct kvm_s390_irq into the buffer and pass it to userspace.
      
      To store interrupt state into a buffer provided by userspace, we add an
      ioctl KVM_S390_SET_IRQ_STATE. It passes a struct kvm_s390_irq_state into
      the kernel and injects all interrupts contained in the buffer.
      Signed-off-by: NJens Freimann <jfrei@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      816c7667
    • J
      KVM: s390: deliver floating interrupts in order of priority · 6d3da241
      Jens Freimann 提交于
      This patch makes interrupt handling compliant to the z/Architecture
      Principles of Operation with regard to interrupt priorities.
      
      Add a bitmap for pending floating interrupts. Each bit relates to a
      interrupt type and its list. A turned on bit indicates that a list
      contains items (interrupts) which need to be delivered.  When delivering
      interrupts on a cpu we can merge the existing bitmap for cpu-local
      interrupts and floating interrupts and have a single mechanism for
      delivery.
      Currently we have one list for all kinds of floating interrupts and a
      corresponding spin lock. This patch adds a separate list per
      interrupt type. An exception to this are service signal and machine check
      interrupts, as there can be only one pending interrupt at a time.
      Signed-off-by: NJens Freimann <jfrei@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      6d3da241
  15. 17 3月, 2015 3 次提交
  16. 06 3月, 2015 2 次提交
  17. 04 3月, 2015 1 次提交
    • M
      KVM: s390: include guest facilities in kvm facility test · 981467c9
      Michael Mueller 提交于
      Most facility related decisions in KVM have to take into account:
      
      - the facilities offered by the underlying run container (LPAR/VM)
      - the facilities supported by the KVM code itself
      - the facilities requested by a guest VM
      
      This patch adds the KVM driver requested facilities to the test routine.
      
      It additionally renames struct s390_model_fac to kvm_s390_fac and its field
      names to be more meaningful.
      
      The semantics of the facilities stored in the KVM architecture structure
      is changed. The address arch.model.fac->list now points to the guest
      facility list and arch.model.fac->mask points to the KVM facility mask.
      
      This patch fixes the behaviour of KVM for some facilities for guests
      that ignore the guest visible facility bits, e.g. guests could use
      transactional memory intructions on hosts supporting them even if the
      chosen cpu model would not offer them.
      
      The userspace interface is not affected by this change.
      Signed-off-by: NMichael Mueller <mimu@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      981467c9
  18. 09 2月, 2015 1 次提交
  19. 23 1月, 2015 3 次提交
  20. 28 11月, 2014 1 次提交