1. 17 12月, 2021 1 次提交
  2. 25 10月, 2021 1 次提交
  3. 22 9月, 2021 1 次提交
  4. 28 8月, 2021 1 次提交
    • H
      KVM: s390: index kvm->arch.idle_mask by vcpu_idx · a3e03bc1
      Halil Pasic 提交于
      While in practice vcpu->vcpu_idx ==  vcpu->vcp_id is often true, it may
      not always be, and we must not rely on this. Reason is that KVM decides
      the vcpu_idx, userspace decides the vcpu_id, thus the two might not
      match.
      
      Currently kvm->arch.idle_mask is indexed by vcpu_id, which implies
      that code like
      for_each_set_bit(vcpu_id, kvm->arch.idle_mask, online_vcpus) {
                      vcpu = kvm_get_vcpu(kvm, vcpu_id);
      		do_stuff(vcpu);
      }
      is not legit. Reason is that kvm_get_vcpu expects an vcpu_idx, not an
      vcpu_id.  The trouble is, we do actually use kvm->arch.idle_mask like
      this. To fix this problem we have two options. Either use
      kvm_get_vcpu_by_id(vcpu_id), which would loop to find the right vcpu_id,
      or switch to indexing via vcpu_idx. The latter is preferable for obvious
      reasons.
      
      Let us make switch from indexing kvm->arch.idle_mask by vcpu_id to
      indexing it by vcpu_idx.  To keep gisa_int.kicked_mask indexed by the
      same index as idle_mask lets make the same change for it as well.
      
      Fixes: 1ee0bc55 ("KVM: s390: get rid of local_int array")
      Signed-off-by: NHalil Pasic <pasic@linux.ibm.com>
      Reviewed-by: NChristian Bornträger <borntraeger@de.ibm.com>
      Reviewed-by: NClaudio Imbrenda <imbrenda@linux.ibm.com>
      Cc: <stable@vger.kernel.org> # 3.15+
      Link: https://lore.kernel.org/r/20210827125429.1912577-1-pasic@linux.ibm.comSigned-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      a3e03bc1
  5. 09 3月, 2021 1 次提交
  6. 28 2月, 2020 3 次提交
  7. 05 2月, 2019 2 次提交
  8. 26 9月, 2018 1 次提交
  9. 17 5月, 2018 1 次提交
  10. 09 3月, 2018 1 次提交
  11. 21 2月, 2018 1 次提交
  12. 14 2月, 2018 1 次提交
  13. 26 1月, 2018 1 次提交
    • M
      KVM: s390: exploit GISA and AIV for emulated interrupts · d7c5cb01
      Michael Mueller 提交于
      The adapter interruption virtualization (AIV) facility is an
      optional facility that comes with functionality expected to increase
      the performance of adapter interrupt handling for both emulated and
      passed-through adapter interrupts. With AIV, adapter interrupts can be
      delivered to the guest without exiting SIE.
      
      This patch provides some preparations for using AIV for emulated adapter
      interrupts (including virtio) if it's available. When using AIV, the
      interrupts are delivered at the so called GISA by setting the bit
      corresponding to its Interruption Subclass (ISC) in the Interruption
      Pending Mask (IPM) instead of inserting a node into the floating interrupt
      list.
      
      To keep the change reasonably small, the handling of this new state is
      deferred in get_all_floating_irqs and handle_tpi. This patch concentrates
      on the code handling enqueuement of emulated adapter interrupts, and their
      delivery to the guest.
      
      Note that care is still required for adapter interrupts using AIV,
      because there is no guarantee that AIV is going to deliver the adapter
      interrupts pending at the GISA (consider all vcpus idle). When delivering
      GISA adapter interrupts by the host (usual mechanism) special attention
      is required to honor interrupt priorities.
      
      Empirical results show that the time window between making an interrupt
      pending at the GISA and doing kvm_s390_deliver_pending_interrupts is
      sufficient for a guest with at least moderate cpu activity to get adapter
      interrupts delivered within the SIE, and potentially save some SIE exits
      (if not other deliverable interrupts).
      
      The code will be activated with a follow-up patch.
      Signed-off-by: NMichael Mueller <mimu@linux.vnet.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Reviewed-by: NDavid Hildenbrand <david@redhat.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      d7c5cb01
  14. 25 1月, 2018 3 次提交
  15. 16 1月, 2018 1 次提交
  16. 06 12月, 2017 2 次提交
    • G
      KVM: s390: Remove redundant license text · 940f89a5
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all arch/s390/kvm/ files, that identifies
      the license in a specific and legally-defined manner.  So the extra GPL
      text wording can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cohuck@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Message-Id: <20171124140043.10062-9-gregkh@linuxfoundation.org>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Acked-by: N"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      940f89a5
    • G
      KVM: s390: add SPDX identifiers to the remaining files · d809aa23
      Greg Kroah-Hartman 提交于
      It's good to have SPDX identifiers in all files to make it easier to
      audit the kernel tree for correct licenses.
      
      Update the arch/s390/kvm/ files with the correct SPDX license
      identifier based on the license text in the file itself.  The SPDX
      identifier is a legally binding shorthand, which can be used instead of
      the full boiler plate text.
      
      This work is based on a script and data from Thomas Gleixner, Philippe
      Ombredanne, and Kate Stewart.
      
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cohuck@redhat.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Message-Id: <20171124140043.10062-3-gregkh@linuxfoundation.org>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      d809aa23
  17. 09 10月, 2017 1 次提交
  18. 29 8月, 2017 1 次提交
  19. 28 6月, 2017 1 次提交
    • Q
      KVM: s390: Inject machine check into the guest · 4d62fcc0
      QingFeng Hao 提交于
      If the exit flag of SIE indicates that a machine check has happened
      during guest's running and needs to be injected, inject it to the guest
      accordingly.
      But some machine checks, e.g. Channel Report Pending (CRW), refer to
      host conditions only (the guest's channel devices are not managed by
      the kernel directly) and are therefore not injected into the guest.
      External Damage (ED) is also not reinjected into the guest because ETR
      conditions are gone in Linux and STP conditions are not enabled in the
      guest, and ED contains only these 8 ETR and STP conditions.
      In general, instruction-processing damage, system recovery,
      storage error, service-processor damage and channel subsystem damage
      will be reinjected into the guest, and the remain (System damage,
      timing-facility damage, warning, ED and CRW) will be handled on the host.
      Signed-off-by: NQingFeng Hao <haoqf@linux.vnet.ibm.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      4d62fcc0
  20. 21 4月, 2017 1 次提交
  21. 23 3月, 2017 1 次提交
  22. 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
  23. 30 1月, 2017 2 次提交
  24. 08 9月, 2016 3 次提交
  25. 05 7月, 2016 1 次提交
  26. 21 6月, 2016 3 次提交
  27. 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
  28. 08 3月, 2016 1 次提交