Merge branches 'for-next/sysreg', 'for-next/sme', 'for-next/kselftest', 'for-next...
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 10 Feb 2023 18:51:49 +0000 (18:51 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 10 Feb 2023 18:51:49 +0000 (18:51 +0000)
* arm64/for-next/perf:
  perf: arm_spe: Print the version of SPE detected
  perf: arm_spe: Add support for SPEv1.2 inverted event filtering
  perf: Add perf_event_attr::config3
  drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable
  perf: arm_spe: Support new SPEv1.2/v8.7 'not taken' event
  perf: arm_spe: Use new PMSIDR_EL1 register enums
  perf: arm_spe: Drop BIT() and use FIELD_GET/PREP accessors
  arm64/sysreg: Convert SPE registers to automatic generation
  arm64: Drop SYS_ from SPE register defines
  perf: arm_spe: Use feature numbering for PMSEVFR_EL1 defines
  perf/marvell: Add ACPI support to TAD uncore driver
  perf/marvell: Add ACPI support to DDR uncore driver
  perf/arm-cmn: Reset DTM_PMU_CONFIG at probe
  drivers/perf: hisi: Extract initialization of "cpa_pmu->pmu"
  drivers/perf: hisi: Simplify the parameters of hisi_pmu_init()
  drivers/perf: hisi: Advertise the PERF_PMU_CAP_NO_EXCLUDE capability

* for-next/sysreg:
  : arm64 sysreg and cpufeature fixes/updates
  KVM: arm64: Use symbolic definition for ISR_EL1.A
  arm64/sysreg: Add definition of ISR_EL1
  arm64/sysreg: Add definition for ICC_NMIAR1_EL1
  arm64/cpufeature: Remove 4 bit assumption in ARM64_FEATURE_MASK()
  arm64/sysreg: Fix errors in 32 bit enumeration values
  arm64/cpufeature: Fix field sign for DIT hwcap detection

* for-next/sme:
  : SME-related updates
  arm64/sme: Optimise SME exit on syscall entry
  arm64/sme: Don't use streaming mode to probe the maximum SME VL
  arm64/ptrace: Use system_supports_tpidr2() to check for TPIDR2 support

* for-next/kselftest: (23 commits)
  : arm64 kselftest fixes and improvements
  kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests
  kselftest/arm64: Copy whole EXTRA context
  kselftest/arm64: Fix enumeration of systems without 128 bit SME for SSVE+ZA
  kselftest/arm64: Fix enumeration of systems without 128 bit SME
  kselftest/arm64: Don't require FA64 for streaming SVE tests
  kselftest/arm64: Limit the maximum VL we try to set via ptrace
  kselftest/arm64: Correct buffer size for SME ZA storage
  kselftest/arm64: Remove the local NUM_VL definition
  kselftest/arm64: Verify simultaneous SSVE and ZA context generation
  kselftest/arm64: Verify that SSVE signal context has SVE_SIG_FLAG_SM set
  kselftest/arm64: Remove spurious comment from MTE test Makefile
  kselftest/arm64: Support build of MTE tests with clang
  kselftest/arm64: Initialise current at build time in signal tests
  kselftest/arm64: Don't pass headers to the compiler as source
  kselftest/arm64: Remove redundant _start labels from FP tests
  kselftest/arm64: Fix .pushsection for strings in FP tests
  kselftest/arm64: Run BTI selftests on systems without BTI
  kselftest/arm64: Fix test numbering when skipping tests
  kselftest/arm64: Skip non-power of 2 SVE vector lengths in fp-stress
  kselftest/arm64: Only enumerate power of two VLs in syscall-abi
  ...

* for-next/misc:
  : Miscellaneous arm64 updates
  arm64/mm: Intercept pfn changes in set_pte_at()
  Documentation: arm64: correct spelling
  arm64: traps: attempt to dump all instructions
  arm64: Apply dynamic shadow call stack patching in two passes
  arm64: el2_setup.h: fix spelling typo in comments
  arm64: Kconfig: fix spelling
  arm64: cpufeature: Use kstrtobool() instead of strtobool()
  arm64: Avoid repeated AA64MMFR1_EL1 register read on pagefault path
  arm64: make ARCH_FORCE_MAX_ORDER selectable

* for-next/sme2: (23 commits)
  : Support for arm64 SME 2 and 2.1
  arm64/sme: Fix __finalise_el2 SMEver check
  kselftest/arm64: Remove redundant _start labels from zt-test
  kselftest/arm64: Add coverage of SME 2 and 2.1 hwcaps
  kselftest/arm64: Add coverage of the ZT ptrace regset
  kselftest/arm64: Add SME2 coverage to syscall-abi
  kselftest/arm64: Add test coverage for ZT register signal frames
  kselftest/arm64: Teach the generic signal context validation about ZT
  kselftest/arm64: Enumerate SME2 in the signal test utility code
  kselftest/arm64: Cover ZT in the FP stress test
  kselftest/arm64: Add a stress test program for ZT0
  arm64/sme: Add hwcaps for SME 2 and 2.1 features
  arm64/sme: Implement ZT0 ptrace support
  arm64/sme: Implement signal handling for ZT
  arm64/sme: Implement context switching for ZT0
  arm64/sme: Provide storage for ZT0
  arm64/sme: Add basic enumeration for SME2
  arm64/sme: Enable host kernel to access ZT0
  arm64/sme: Manually encode ZT0 load and store instructions
  arm64/esr: Document ISS for ZT0 being disabled
  arm64/sme: Document SME 2 and SME 2.1 ABI
  ...

* for-next/tpidr2:
  : Include TPIDR2 in the signal context
  kselftest/arm64: Add test case for TPIDR2 signal frame records
  kselftest/arm64: Add TPIDR2 to the set of known signal context records
  arm64/signal: Include TPIDR2 in the signal context
  arm64/sme: Document ABI for TPIDR2 signal information

* for-next/scs:
  : arm64: harden shadow call stack pointer handling
  arm64: Stash shadow stack pointer in the task struct on interrupt
  arm64: Always load shadow stack pointer directly from the task struct

* for-next/compat-hwcap:
  : arm64: Expose compat ARMv8 AArch32 features (HWCAPs)
  arm64: Add compat hwcap SSBS
  arm64: Add compat hwcap SB
  arm64: Add compat hwcap I8MM
  arm64: Add compat hwcap ASIMDBF16
  arm64: Add compat hwcap ASIMDFHM
  arm64: Add compat hwcap ASIMDDP
  arm64: Add compat hwcap FPHP and ASIMDHP

* for-next/ftrace:
  : Add arm64 support for DYNAMICE_FTRACE_WITH_CALL_OPS
  arm64: avoid executing padding bytes during kexec / hibernation
  arm64: Implement HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
  arm64: ftrace: Update stale comment
  arm64: patching: Add aarch64_insn_write_literal_u64()
  arm64: insn: Add helpers for BTI
  arm64: Extend support for CONFIG_FUNCTION_ALIGNMENT
  ACPI: Don't build ACPICA with '-Os'
  Compiler attributes: GCC cold function alignment workarounds
  ftrace: Add DYNAMIC_FTRACE_WITH_CALL_OPS

* for-next/efi-boot-mmu-on:
  : Permit arm64 EFI boot with MMU and caches on
  arm64: kprobes: Drop ID map text from kprobes blacklist
  arm64: head: Switch endianness before populating the ID map
  efi: arm64: enter with MMU and caches enabled
  arm64: head: Clean the ID map and the HYP text to the PoC if needed
  arm64: head: avoid cache invalidation when entering with the MMU on
  arm64: head: record the MMU state at primary entry
  arm64: kernel: move identity map out of .text mapping
  arm64: head: Move all finalise_el2 calls to after __enable_mmu

* for-next/ptrauth:
  : arm64 pointer authentication cleanup
  arm64: pauth: don't sign leaf functions
  arm64: unify asm-arch manipulation

* for-next/pseudo-nmi:
  : Pseudo-NMI code generation optimisations
  arm64: irqflags: use alternative branches for pseudo-NMI logic
  arm64: add ARM64_HAS_GIC_PRIO_RELAXED_SYNC cpucap
  arm64: make ARM64_HAS_GIC_PRIO_MASKING depend on ARM64_HAS_GIC_CPUIF_SYSREGS
  arm64: rename ARM64_HAS_IRQ_PRIO_MASKING to ARM64_HAS_GIC_PRIO_MASKING
  arm64: rename ARM64_HAS_SYSREG_GIC_CPUIF to ARM64_HAS_GIC_CPUIF_SYSREGS

27 files changed:
1  2  3  4  5  6  7  8  9  10  11  12  13 
Documentation/arm64/booting.rst
Documentation/arm64/elf_hwcaps.rst
Documentation/arm64/sme.rst
arch/arm64/Kconfig
arch/arm64/Makefile
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/el2_setup.h
arch/arm64/include/asm/hwcap.h
arch/arm64/include/asm/sysreg.h
arch/arm64/include/uapi/asm/sigcontext.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/cpuinfo.c
arch/arm64/kernel/entry.S
arch/arm64/kernel/fpsimd.c
arch/arm64/kernel/head.S
arch/arm64/kernel/image-vars.h
arch/arm64/kernel/ptrace.c
arch/arm64/kernel/signal.c
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/tools/cpucaps
arch/arm64/tools/sysreg
tools/testing/selftests/arm64/abi/syscall-abi-asm.S
tools/testing/selftests/arm64/abi/syscall-abi.c
tools/testing/selftests/arm64/fp/fp-stress.c
tools/testing/selftests/arm64/signal/.gitignore
tools/testing/selftests/arm64/signal/test_signals_utils.c
tools/testing/selftests/arm64/signal/testcases/testcases.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,1c5e557a36178ad4ccbab04f27fe6c941d678af4,5fe45c7c5e4fe06ff9be44f028eb6ba2b2cc8160,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2,e0d09bf5b01b80a8ed637bc1f0dd51168f0a55a2..ed692284f1990480e033acba7d67bb4d1a04894a
@@@@@@@@@@@@@@ -56,7 -56,7 -56,7 -56,7 -56,7 -56,8 -56,8 -56,7 -56,7 -56,7 -56,7 -56,7 -56,7 +56,9 @@@@@@@@@@@@@@ struct rt_sigframe_user_layout 
                unsigned long fpsimd_offset;
                unsigned long esr_offset;
                unsigned long sve_offset;
++++++ ++++++   unsigned long tpidr2_offset;
                unsigned long za_offset;
+++++ +++++++   unsigned long zt_offset;
                unsigned long extra_offset;
                unsigned long end_offset;
             };
@@@@@@@@@@@@@@ -220,7 -220,7 -220,7 -220,7 -220,7 -221,8 -221,8 -220,7 -220,7 -220,7 -220,7 -220,7 -220,7 +222,9 @@@@@@@@@@@@@@ static int restore_fpsimd_context(struc
             struct user_ctxs {
                struct fpsimd_context __user *fpsimd;
                struct sve_context __user *sve;
++++++ ++++++   struct tpidr2_context __user *tpidr2;
                struct za_context __user *za;
+++++ +++++++   struct zt_context __user *zt;
             };
             
             #ifdef CONFIG_ARM64_SVE
@@@@@@@@@@@@@@ -450,8 -450,8 -450,8 -450,8 -450,8 -520,10 -478,10 -450,8 -450,8 -450,8 -450,8 -450,8 -450,8 +548,12 @@@@@@@@@@@@@@ static int restore_zt_context(struct us
             #else /* ! CONFIG_ARM64_SME */
             
             /* Turn any non-optimised out attempts to use these into a link error: */
++++++ ++++++extern int preserve_tpidr2_context(void __user *ctx);
++++++ ++++++extern int restore_tpidr2_context(struct user_ctxs *user);
             extern int preserve_za_context(void __user *ctx);
             extern int restore_za_context(struct user_ctxs *user);
+++++ +++++++extern int preserve_zt_context(void __user *ctx);
+++++ +++++++extern int restore_zt_context(struct user_ctxs *user);
             
             #endif /* ! CONFIG_ARM64_SME */
             
@@@@@@@@@@@@@@ -468,7 -468,7 -468,7 -468,7 -468,7 -540,8 -498,8 -468,7 -468,7 -468,7 -468,7 -468,7 -468,7 +570,9 @@@@@@@@@@@@@@ static int parse_user_sigframe(struct u
             
                user->fpsimd = NULL;
                user->sve = NULL;
++++++ ++++++   user->tpidr2 = NULL;
                user->za = NULL;
+++++ +++++++   user->zt = NULL;
             
                if (!IS_ALIGNED((unsigned long)base, 16))
                        goto invalid;
Simple merge
Simple merge
Simple merge
index dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,834616fde23ed079ac684b1db6aef01218166ba2,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,9800f9dc6b35faceb6bc785b0c5e5beeb612efac,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094,dd7ebe536d05faec4cc7053ee10c9e39bf31e094..18cc123e23470c248102c1c1f99cb6bc96859959
@@@@@@@@@@@@@@ -371,20 -371,20 -371,20 -384,12 -371,20 -401,20 -371,20 -371,20 -371,20 -371,20 -371,20 -371,20 -371,20 +414,12 @@@@@@@@@@@@@@ static void test_one_syscall(struct sys
                                ksft_exit_fail_msg("PR_SVE_SET_VL failed: %s (%d)\n",
                                                   strerror(errno), errno);
             
--- ---------           sve_vl &= PR_SVE_VL_LEN_MASK;
--- ---------
--- ---------           if (sve_vq != sve_vq_from_vl(sve_vl))
--- ---------                   sve_vq = sve_vq_from_vl(sve_vl);
--- - -------
--- - -------           ksft_test_result(do_test(cfg, sve_vl, default_sme_vl, 0),
--- - -------                            "%s SVE VL %d\n", cfg->name, sve_vl);
--- - -------
--- - -------           if (!(getauxval(AT_HWCAP2) & HWCAP2_SME))
--- - -------                   continue;
+++ +++++++++           ksft_test_result(do_test(cfg, sve_vls[sve], default_sme_vl, 0),
+++ +++++++++                            "%s SVE VL %d\n", cfg->name, sve_vls[sve]);
             
     -                  ksft_test_result(do_test(cfg, sve_vl, default_sme_vl, 0),
     -                                   "%s SVE VL %d\n", cfg->name, sve_vl);
     -       
     -                  if (!(getauxval(AT_HWCAP2) & HWCAP2_SME))
     -                          continue;
     -       
--- ---------           for (sme_vq = SVE_VQ_MAX; sme_vq > 0; --sme_vq) {
--- ---------                   sme_vl = prctl(PR_SME_SET_VL, sme_vq * 16);
--- ---------                   if (sme_vl == -1)
+++ +++++++++           for (sme = 0; sme < sme_vl_count; sme++) {
+++ +++++++++                   ret = prctl(PR_SME_SET_VL, sme_vls[sme]);
+++ +++++++++                   if (ret == -1)
                                        ksft_exit_fail_msg("PR_SME_SET_VL failed: %s (%d)\n",
                                                           strerror(errno), errno);
             
                srandom(getpid());
             
                ksft_print_header();
--- ---------   tests += sve_count_vls();
--- ---------   tests += (sve_count_vls() * sme_count_vls()) * 3;
+++ +++++++++
+++ +++++++++   sve_count_vls();
+++ +++++++++   sme_count_vls();
+++ +++++++++
+++ +++++++++   tests += sve_vl_count;
+++ +++++++++   tests += sme_vl_count * 3;
+++ +++++++++   tests += (sve_vl_count * sme_vl_count) * 3;
                ksft_set_plan(ARRAY_SIZE(syscalls) * tests);
             
+++++ +++++++   if (getauxval(AT_HWCAP2) & HWCAP2_SME2)
+++++ +++++++           sme_ver = 2;
+++++ +++++++   else
+++++ +++++++           sme_ver = 1;
+++++ +++++++
                if (getauxval(AT_HWCAP2) & HWCAP2_SME_FA64)
----- -------           ksft_print_msg("SME with FA64\n");
+++++ +++++++           ksft_print_msg("SME%d with FA64\n", sme_ver);
                else if (getauxval(AT_HWCAP2) & HWCAP2_SME)
----- -------           ksft_print_msg("SME without FA64\n");
+++++ +++++++           ksft_print_msg("SME%d without FA64\n", sme_ver);
             
                for (i = 0; i < ARRAY_SIZE(syscalls); i++)
                        test_one_syscall(&syscalls[i]);
index e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,b7fbb65183e85e33cd23c91c19dd750dbc07a48b,e1b6c4d961b57b3b76e6ec9d77aabeb5268eff74,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67,e8d2b57f73ec146e430ef3f1f480f7c24b11ad67..8ab4c86837fdf3b484575adf99073c21916c1d70
@@@@@@@@@@@@@@ -4,5 -4,5 -4,5 -4,5 -4,5 -4,6 -4,6 -4,5 -4,5 -4,5 -4,5 -4,5 -4,5 +4,7 @@@@@@@@@@@@@@ fake_sigreturn_
             sme_*
             ssve_*
             sve_*
++++++ ++++++tpidr2_siginfo
             za_*
+++++ +++++++zt_*
             !*.[ch]