Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Oleg Nesterov <oleg@redhat.com>,
	Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Oliver Upton <oliver.upton@linux.dev>,
	Shuah Khan <shuah@kernel.org>
Cc: Alan Hayward <alan.hayward@arm.com>,
	Luis Machado <luis.machado@arm.com>,
	Szabolcs Nagy <szabolcs.nagy@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev,
	linux-kselftest@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: [PATCH v4 00/21] arm64/sme: Support SME 2 and SME 2.1
Date: Mon, 16 Jan 2023 16:04:36 +0000	[thread overview]
Message-ID: <20221208-arm64-sme2-v4-0-f2fa0aef982f@kernel.org> (raw)

Arm have recently released versions 2 and 2.1 of the SME extension.
Among the features introduced by SME 2 is some new architectural state,
the ZT0 register. This series adds support for this and all the other
features of the new SME versions.

Since the architecture has been designed with the possibility of adding
further ZTn registers in mind the interfaces added for ZT0 are done with
this possibility in mind. As ZT0 is a simple fixed size register these
interfaces are all fairly simple, the main complication is that ZT0 is
only accessible when PSTATE.ZA is enabled. The memory allocation that we
already do for PSTATE.ZA is extended to include space for ZT0.

Due to textual collisions especially around the addition of hwcaps this
is based on the recently merged series "arm64: Support for 2022 data
processing instructions" but there is no meaningful interaction.  There
will be collisions with "arm64/signal: Signal handling cleanups" if that
is applied but again not super substantial.

v4:
 - Rebase onto v6.2-rc3.
 - Add SME2 value to ID_AA64PFR1_EL1.SME and move cpufeature to key off
   it.
 - Fix cut'n'paste errors and missing capability in hwcap table.
 - Fix bitrot in za-test program.
 - Typo and cut'n'paste fixes.
v3:
 - Rebase onto merged series for the 2022 architectur extensions.
 - Clarifications and typo fixes in the ABI documentation.
v2:
 - Add missing initialisation of user->zt in signal context parsing.
 - Change the magic for ZT signal frames to 0x5a544e01 (ZTN0).

To: Catalin Marinas <catalin.marinas@arm.com>
To: Will Deacon <will@kernel.org>
To: Oleg Nesterov <oleg@redhat.com>
To: Marc Zyngier <maz@kernel.org>
To: James Morse <james.morse@arm.com>
To: Alexandru Elisei <alexandru.elisei@arm.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: Alan Hayward <alan.hayward@arm.com>
Cc: Luis Machado <luis.machado@arm.com>,
Cc: Szabolcs Nagy <szabolcs.nagy@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: kvmarm@lists.linux.dev
To: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org

---
Mark Brown (21):
      arm64/sme: Rename za_state to sme_state
      arm64: Document boot requirements for SME 2
      arm64/sysreg: Update system registers for SME 2 and 2.1
      arm64/sme: Document SME 2 and SME 2.1 ABI
      arm64/esr: Document ISS for ZT0 being disabled
      arm64/sme: Manually encode ZT0 load and store instructions
      arm64/sme: Enable host kernel to access ZT0
      arm64/sme: Add basic enumeration for SME2
      arm64/sme: Provide storage for ZT0
      arm64/sme: Implement context switching for ZT0
      arm64/sme: Implement signal handling for ZT
      arm64/sme: Implement ZT0 ptrace support
      arm64/sme: Add hwcaps for SME 2 and 2.1 features
      kselftest/arm64: Add a stress test program for ZT0
      kselftest/arm64: Cover ZT in the FP stress test
      kselftest/arm64: Enumerate SME2 in the signal test utility code
      kselftest/arm64: Teach the generic signal context validation about ZT
      kselftest/arm64: Add test coverage for ZT register signal frames
      kselftest/arm64: Add SME2 coverage to syscall-abi
      kselftest/arm64: Add coverage of the ZT ptrace regset
      kselftest/arm64: Add coverage of SME 2 and 2.1 hwcaps

 Documentation/arm64/booting.rst                    |  10 +
 Documentation/arm64/elf_hwcaps.rst                 |  18 +
 Documentation/arm64/sme.rst                        |  52 ++-
 arch/arm64/include/asm/cpufeature.h                |   6 +
 arch/arm64/include/asm/esr.h                       |   1 +
 arch/arm64/include/asm/fpsimd.h                    |  30 +-
 arch/arm64/include/asm/fpsimdmacros.h              |  22 ++
 arch/arm64/include/asm/hwcap.h                     |   6 +
 arch/arm64/include/asm/processor.h                 |   2 +-
 arch/arm64/include/uapi/asm/hwcap.h                |   6 +
 arch/arm64/include/uapi/asm/sigcontext.h           |  19 ++
 arch/arm64/kernel/cpufeature.c                     |  28 ++
 arch/arm64/kernel/cpuinfo.c                        |   6 +
 arch/arm64/kernel/entry-fpsimd.S                   |  30 +-
 arch/arm64/kernel/fpsimd.c                         |  47 ++-
 arch/arm64/kernel/hyp-stub.S                       |   6 +
 arch/arm64/kernel/idreg-override.c                 |   1 +
 arch/arm64/kernel/process.c                        |  21 +-
 arch/arm64/kernel/ptrace.c                         |  60 +++-
 arch/arm64/kernel/signal.c                         | 113 ++++++-
 arch/arm64/kvm/fpsimd.c                            |   2 +-
 arch/arm64/tools/cpucaps                           |   1 +
 arch/arm64/tools/sysreg                            |  27 +-
 include/uapi/linux/elf.h                           |   1 +
 tools/testing/selftests/arm64/abi/hwcap.c          | 115 +++++++
 .../testing/selftests/arm64/abi/syscall-abi-asm.S  |  43 ++-
 tools/testing/selftests/arm64/abi/syscall-abi.c    |  40 ++-
 tools/testing/selftests/arm64/fp/.gitignore        |   2 +
 tools/testing/selftests/arm64/fp/Makefile          |   5 +
 tools/testing/selftests/arm64/fp/fp-stress.c       |  29 +-
 tools/testing/selftests/arm64/fp/sme-inst.h        |  20 ++
 tools/testing/selftests/arm64/fp/zt-ptrace.c       | 365 +++++++++++++++++++++
 tools/testing/selftests/arm64/fp/zt-test.S         | 317 ++++++++++++++++++
 tools/testing/selftests/arm64/signal/.gitignore    |   1 +
 .../testing/selftests/arm64/signal/test_signals.h  |   2 +
 .../selftests/arm64/signal/test_signals_utils.c    |   3 +
 .../selftests/arm64/signal/testcases/testcases.c   |  36 ++
 .../selftests/arm64/signal/testcases/testcases.h   |   1 +
 .../selftests/arm64/signal/testcases/zt_no_regs.c  |  51 +++
 .../selftests/arm64/signal/testcases/zt_regs.c     |  85 +++++
 40 files changed, 1558 insertions(+), 72 deletions(-)
---
base-commit: b7bfaa761d760e72a969d116517eaa12e404c262
change-id: 20221208-arm64-sme2-363c27227a32

Best regards,
-- 
Mark Brown <broonie@kernel.org>


             reply	other threads:[~2023-01-16 16:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 16:04 Mark Brown [this message]
2023-01-16 16:04 ` [PATCH v4 01/21] arm64/sme: Rename za_state to sme_state Mark Brown
2023-01-16 16:04 ` [PATCH v4 02/21] arm64: Document boot requirements for SME 2 Mark Brown
2023-01-16 16:04 ` [PATCH v4 03/21] arm64/sysreg: Update system registers for SME 2 and 2.1 Mark Brown
2023-01-16 16:04 ` [PATCH v4 04/21] arm64/sme: Document SME 2 and SME 2.1 ABI Mark Brown
2023-01-16 16:04 ` [PATCH v4 05/21] arm64/esr: Document ISS for ZT0 being disabled Mark Brown
2023-01-16 16:04 ` [PATCH v4 06/21] arm64/sme: Manually encode ZT0 load and store instructions Mark Brown
2023-01-16 16:04 ` [PATCH v4 07/21] arm64/sme: Enable host kernel to access ZT0 Mark Brown
2023-02-06  9:31   ` Marc Zyngier
2023-02-06 13:02     ` Mark Brown
2023-02-06 16:44     ` Catalin Marinas
2023-01-16 16:04 ` [PATCH v4 08/21] arm64/sme: Add basic enumeration for SME2 Mark Brown
2023-01-16 16:04 ` [PATCH v4 09/21] arm64/sme: Provide storage for ZT0 Mark Brown
2023-01-16 16:04 ` [PATCH v4 10/21] arm64/sme: Implement context switching " Mark Brown
2023-01-16 16:04 ` [PATCH v4 11/21] arm64/sme: Implement signal handling for ZT Mark Brown
2023-01-16 16:04 ` [PATCH v4 12/21] arm64/sme: Implement ZT0 ptrace support Mark Brown
2023-01-16 16:04 ` [PATCH v4 13/21] arm64/sme: Add hwcaps for SME 2 and 2.1 features Mark Brown
2023-01-16 16:04 ` [PATCH v4 14/21] kselftest/arm64: Add a stress test program for ZT0 Mark Brown
2023-01-16 16:04 ` [PATCH v4 15/21] kselftest/arm64: Cover ZT in the FP stress test Mark Brown
2023-01-16 16:04 ` [PATCH v4 16/21] kselftest/arm64: Enumerate SME2 in the signal test utility code Mark Brown
2023-01-16 16:04 ` [PATCH v4 17/21] kselftest/arm64: Teach the generic signal context validation about ZT Mark Brown
2023-01-16 16:04 ` [PATCH v4 18/21] kselftest/arm64: Add test coverage for ZT register signal frames Mark Brown
2023-01-16 16:04 ` [PATCH v4 19/21] kselftest/arm64: Add SME2 coverage to syscall-abi Mark Brown
2023-01-16 16:04 ` [PATCH v4 20/21] kselftest/arm64: Add coverage of the ZT ptrace regset Mark Brown
2023-01-16 16:04 ` [PATCH v4 21/21] kselftest/arm64: Add coverage of SME 2 and 2.1 hwcaps Mark Brown
2023-01-20 16:59 ` [PATCH v4 00/21] arm64/sme: Support SME 2 and SME 2.1 Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221208-arm64-sme2-v4-0-f2fa0aef982f@kernel.org \
    --to=broonie@kernel.org \
    --cc=alan.hayward@arm.com \
    --cc=alexandru.elisei@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luis.machado@arm.com \
    --cc=maz@kernel.org \
    --cc=oleg@redhat.com \
    --cc=oliver.upton@linux.dev \
    --cc=shuah@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=szabolcs.nagy@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox