Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-07-19 16:14:13 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-07-19 16:56:04 +0200
commit24386ec3994e8d30dc17a1ede6461f20132bbebf (patch)
treedbc06506cdaa2025de3c6dfdf12192b4230f6b60
parentd6e1afab2e634ebeaa8e990cd3e053e4749bb6a9 (diff)
s390/cpum_cf: Add support for CPU-MF SVN 6 (jsc#SLE-6904
-rw-r--r--patches.suse/s390-cpum_cf-add-support-for-cpu-mf-svn-6164
-rw-r--r--series.conf1
2 files changed, 165 insertions, 0 deletions
diff --git a/patches.suse/s390-cpum_cf-add-support-for-cpu-mf-svn-6 b/patches.suse/s390-cpum_cf-add-support-for-cpu-mf-svn-6
new file mode 100644
index 0000000000..2120ccfbff
--- /dev/null
+++ b/patches.suse/s390-cpum_cf-add-support-for-cpu-mf-svn-6
@@ -0,0 +1,164 @@
+From: Thomas Richter <tmricht@linux.ibm.com>
+Date: Thu, 28 Mar 2019 11:21:47 +0100
+Subject: s390/cpum_cf: Add support for CPU-MF SVN 6
+Git-commit: 46a984ffb86c8542fa510656fa8cb33befe8ee8f
+Patch-mainline: v5.2-rc1
+References: jsc#SLE-6904 FATE#327581
+
+Add support for the CPU-Measurement Facility counter
+second version number 6. This number is used to detect some
+more counters in the crypto counter set and the extended
+counter set.
+
+Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
+Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Acked-by: Petr Tesarik <ptesarik@suse.com>
+---
+ arch/s390/kernel/perf_cpum_cf.c | 4 -
+ arch/s390/kernel/perf_cpum_cf_events.c | 107 ++++++++++++++++++++++-----------
+ 2 files changed, 75 insertions(+), 36 deletions(-)
+
+--- a/arch/s390/kernel/perf_cpum_cf.c
++++ b/arch/s390/kernel/perf_cpum_cf.c
+@@ -1,8 +1,8 @@
+ /*
+ * Performance event support for s390x - CPU-measurement Counter Facility
+ *
+- * Copyright IBM Corp. 2012, 2017
+- * Author(s): Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
++ * Copyright IBM Corp. 2012, 2019
++ * Author(s): Hendrik Brueckner <brueckner@linux.ibm.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License (version 2 only)
+--- a/arch/s390/kernel/perf_cpum_cf_events.c
++++ b/arch/s390/kernel/perf_cpum_cf_events.c
+@@ -29,22 +29,26 @@ CPUMF_EVENT_ATTR(cf_fvn3, PROBLEM_STATE_
+ CPUMF_EVENT_ATTR(cf_fvn3, PROBLEM_STATE_INSTRUCTIONS, 0x0021);
+ CPUMF_EVENT_ATTR(cf_fvn3, L1D_DIR_WRITES, 0x0004);
+ CPUMF_EVENT_ATTR(cf_fvn3, L1D_PENALTY_CYCLES, 0x0005);
+-CPUMF_EVENT_ATTR(cf_svn_generic, PRNG_FUNCTIONS, 0x0040);
+-CPUMF_EVENT_ATTR(cf_svn_generic, PRNG_CYCLES, 0x0041);
+-CPUMF_EVENT_ATTR(cf_svn_generic, PRNG_BLOCKED_FUNCTIONS, 0x0042);
+-CPUMF_EVENT_ATTR(cf_svn_generic, PRNG_BLOCKED_CYCLES, 0x0043);
+-CPUMF_EVENT_ATTR(cf_svn_generic, SHA_FUNCTIONS, 0x0044);
+-CPUMF_EVENT_ATTR(cf_svn_generic, SHA_CYCLES, 0x0045);
+-CPUMF_EVENT_ATTR(cf_svn_generic, SHA_BLOCKED_FUNCTIONS, 0x0046);
+-CPUMF_EVENT_ATTR(cf_svn_generic, SHA_BLOCKED_CYCLES, 0x0047);
+-CPUMF_EVENT_ATTR(cf_svn_generic, DEA_FUNCTIONS, 0x0048);
+-CPUMF_EVENT_ATTR(cf_svn_generic, DEA_CYCLES, 0x0049);
+-CPUMF_EVENT_ATTR(cf_svn_generic, DEA_BLOCKED_FUNCTIONS, 0x004a);
+-CPUMF_EVENT_ATTR(cf_svn_generic, DEA_BLOCKED_CYCLES, 0x004b);
+-CPUMF_EVENT_ATTR(cf_svn_generic, AES_FUNCTIONS, 0x004c);
+-CPUMF_EVENT_ATTR(cf_svn_generic, AES_CYCLES, 0x004d);
+-CPUMF_EVENT_ATTR(cf_svn_generic, AES_BLOCKED_FUNCTIONS, 0x004e);
+-CPUMF_EVENT_ATTR(cf_svn_generic, AES_BLOCKED_CYCLES, 0x004f);
++CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_FUNCTIONS, 0x0040);
++CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_CYCLES, 0x0041);
++CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS, 0x0042);
++CPUMF_EVENT_ATTR(cf_svn_12345, PRNG_BLOCKED_CYCLES, 0x0043);
++CPUMF_EVENT_ATTR(cf_svn_12345, SHA_FUNCTIONS, 0x0044);
++CPUMF_EVENT_ATTR(cf_svn_12345, SHA_CYCLES, 0x0045);
++CPUMF_EVENT_ATTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS, 0x0046);
++CPUMF_EVENT_ATTR(cf_svn_12345, SHA_BLOCKED_CYCLES, 0x0047);
++CPUMF_EVENT_ATTR(cf_svn_12345, DEA_FUNCTIONS, 0x0048);
++CPUMF_EVENT_ATTR(cf_svn_12345, DEA_CYCLES, 0x0049);
++CPUMF_EVENT_ATTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS, 0x004a);
++CPUMF_EVENT_ATTR(cf_svn_12345, DEA_BLOCKED_CYCLES, 0x004b);
++CPUMF_EVENT_ATTR(cf_svn_12345, AES_FUNCTIONS, 0x004c);
++CPUMF_EVENT_ATTR(cf_svn_12345, AES_CYCLES, 0x004d);
++CPUMF_EVENT_ATTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS, 0x004e);
++CPUMF_EVENT_ATTR(cf_svn_12345, AES_BLOCKED_CYCLES, 0x004f);
++CPUMF_EVENT_ATTR(cf_svn_6, ECC_FUNCTION_COUNT, 0x0050);
++CPUMF_EVENT_ATTR(cf_svn_6, ECC_CYCLES_COUNT, 0x0051);
++CPUMF_EVENT_ATTR(cf_svn_6, ECC_BLOCKED_FUNCTION_COUNT, 0x0052);
++CPUMF_EVENT_ATTR(cf_svn_6, ECC_BLOCKED_CYCLES_COUNT, 0x0053);
+ CPUMF_EVENT_ATTR(cf_z10, L1I_L2_SOURCED_WRITES, 0x0080);
+ CPUMF_EVENT_ATTR(cf_z10, L1D_L2_SOURCED_WRITES, 0x0081);
+ CPUMF_EVENT_ATTR(cf_z10, L1I_L3_LOCAL_WRITES, 0x0082);
+@@ -260,23 +264,47 @@ static struct attribute *cpumcf_fvn3_pmu
+ NULL,
+ };
+
+-static struct attribute *cpumcf_svn_generic_pmu_event_attr[] __initdata = {
+- CPUMF_EVENT_PTR(cf_svn_generic, PRNG_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, PRNG_CYCLES),
+- CPUMF_EVENT_PTR(cf_svn_generic, PRNG_BLOCKED_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, PRNG_BLOCKED_CYCLES),
+- CPUMF_EVENT_PTR(cf_svn_generic, SHA_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, SHA_CYCLES),
+- CPUMF_EVENT_PTR(cf_svn_generic, SHA_BLOCKED_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, SHA_BLOCKED_CYCLES),
+- CPUMF_EVENT_PTR(cf_svn_generic, DEA_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, DEA_CYCLES),
+- CPUMF_EVENT_PTR(cf_svn_generic, DEA_BLOCKED_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, DEA_BLOCKED_CYCLES),
+- CPUMF_EVENT_PTR(cf_svn_generic, AES_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, AES_CYCLES),
+- CPUMF_EVENT_PTR(cf_svn_generic, AES_BLOCKED_FUNCTIONS),
+- CPUMF_EVENT_PTR(cf_svn_generic, AES_BLOCKED_CYCLES),
++static struct attribute *cpumcf_svn_12345_pmu_event_attr[] __initdata = {
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_CYCLES),
++ NULL,
++};
++
++static struct attribute *cpumcf_svn_6_pmu_event_attr[] __initdata = {
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, PRNG_BLOCKED_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, SHA_BLOCKED_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, DEA_BLOCKED_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_FUNCTIONS),
++ CPUMF_EVENT_PTR(cf_svn_12345, AES_BLOCKED_CYCLES),
++ CPUMF_EVENT_PTR(cf_svn_6, ECC_FUNCTION_COUNT),
++ CPUMF_EVENT_PTR(cf_svn_6, ECC_CYCLES_COUNT),
++ CPUMF_EVENT_PTR(cf_svn_6, ECC_BLOCKED_FUNCTION_COUNT),
++ CPUMF_EVENT_PTR(cf_svn_6, ECC_BLOCKED_CYCLES_COUNT),
+ NULL,
+ };
+
+@@ -560,7 +588,18 @@ __init const struct attribute_group **cp
+ default:
+ cfvn = none;
+ }
+- csvn = cpumcf_svn_generic_pmu_event_attr;
++
++ /* Determine version specific crypto set */
++ switch (ci.csvn) {
++ case 1 ... 5:
++ csvn = cpumcf_svn_12345_pmu_event_attr;
++ break;
++ case 6:
++ csvn = cpumcf_svn_6_pmu_event_attr;
++ break;
++ default:
++ csvn = none;
++ }
+
+ /* Determine model-specific counter set(s) */
+ get_cpu_id(&cpu_id);
diff --git a/series.conf b/series.conf
index 7864b2c0e4..43bbb57a8b 100644
--- a/series.conf
+++ b/series.conf
@@ -46568,6 +46568,7 @@
patches.arch/x86-cpu-hygon-fix-phys_proc_id-calculation-logic-for-multi-die-processors.patch
patches.suse/x86-smpboot-Rename-match_die-to-match_pkg.patch
patches.arch/x86-microcode-fix-the-ancient-deprecated-microcode-loading-method.patch
+ patches.suse/s390-cpum_cf-add-support-for-cpu-mf-svn-6
patches.arch/s390-uv-introduce-guest-side-ultravisor-code
patches.arch/s390-protvirt-add-memory-sharing-for-diag-308-set-store
patches.arch/s390-protvirt-block-kernel-command-line-alteration