1. 17 May, 2022 6 commits
  2. 16 May, 2022 1 commit
  3. 11 May, 2022 3 commits
  4. 09 May, 2022 2 commits
    • Thomas Richter's avatar
      s390/pai: add support for cryptography counters · 39d62336
      Thomas Richter authored
      PMU device driver perf_pai_crypto supports Processor Activity
      Instrumentation (PAI), available with IBM z16:
      - maps a full page to lowcore address 0x1500.
      - uses CR0 bit 13 to turn PAI crypto counting on and off.
      - creates a sample with raw data on each context switch out when
        at context switch some mapped counters have a value of nonzero.
      This device driver only supports CPU wide context, no task context
      is allowed.
      
      Support for counting:
      - one or more counters can be specified using
        perf stat -e pai_crypto/xxx/
        where xxx stands for the counter event name. Multiple invocation
        of this command is possible. The counter names are listed in
        /sys/devices/pai_crypto/events directory.
      - one special counters can be specified using
        perf stat -e pai_crypto/CRYPTO_ALL/
        which returns the sum of all incremented crypto counters.
      - one event pai_crypto/CRYPTO_ALL/ is reserved for sampling.
        No multiple invocations are possible. The event collects data at
        context switch out and saves them in the ring buffer.
      
      Add qpaci assembly instruction to query supported memory mapped crypto
      counters. It returns the number of counters (no holes allowed in that
      range).
      
      The PAI crypto counter events are system wide and can not be executed
      in parallel. Therefore some restrictions documented in function
      paicrypt_busy apply.
      In particular event CRYPTO_ALL for sampling must run exclusive.
      Only counting events can run in parallel.
      
      PAI crypto counter events can not be created when a CPU hot plug
      add is processed. This means a CPU hot plug add does not get
      the necessary PAI event to record PAI cryptography counter increments
      on the newly added CPU. CPU hot plug remove removes the event and
      terminates the counting of PAI counters immediately.
      Co-developed-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Reviewed-by: default avatarJuergen Christ <jchrist@linux.ibm.com>
      Signed-off-by: default avatarThomas Richter <tmricht@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220504062351.2954280-3-tmricht@linux.ibm.comSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      39d62336
    • Sven Schnelle's avatar
      entry: Rename arch_check_user_regs() to arch_enter_from_user_mode() · 6d97af48
      Sven Schnelle authored
      arch_check_user_regs() is used at the moment to verify that struct pt_regs
      contains valid values when entering the kernel from userspace. s390 needs
      a place in the generic entry code to modify a cpu data structure when
      switching from userspace to kernel mode. As arch_check_user_regs() is
      exactly this, rename it to arch_enter_from_user_mode().
      
      When entering the kernel from userspace, arch_check_user_regs() is
      used to verify that struct pt_regs contains valid values. Note that
      the NMI codepath doesn't call this function. s390 needs a place in the
      generic entry code to modify a cpu data structure when switching from
      userspace to kernel mode. As arch_check_user_regs() is exactly this,
      rename it to arch_enter_from_user_mode().
      Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Link: https://lore.kernel.org/r/20220504062351.2954280-2-tmricht@linux.ibm.comSigned-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
      6d97af48
  5. 06 May, 2022 15 commits
  6. 27 Apr, 2022 1 commit
  7. 25 Apr, 2022 12 commits