[v2,00/11] arm64: Support for Armv8.8 memcpy instructions in userspace

Message ID 20230509142235.3284028-1-kristina.martsenko@arm.com
Headers
Series arm64: Support for Armv8.8 memcpy instructions in userspace |

Message

Kristina Martsenko May 9, 2023, 2:22 p.m. UTC
  The Armv8.8 extension adds new instructions to perform memcpy(), memset() and
memmove() operations in hardware (FEAT_MOPS). This series adds support for
using the new instructions in userspace. More information can be found in the
cover letter for v1:
  https://lore.kernel.org/linux-arm-kernel/20230216160012.272345-1-kristina.martsenko@arm.com/

Changes in v2:
 - Removed booting.rst requirement for HCRX_EL2.MCE2
 - Changed HCRX_EL2 cpucap to be STRICT_BOOT type
 - Changed HCRX_EL2.SMPME to be set for the guest and unset for the host
 - Moved HCRX_EL2 initialization into init_el2_state(), dropped ISB
 - Simplified conditional checks in mops exception handler with XOR
 - Added comments from Arm ARM into mops exception handler
 - Converted cpucaps to use the new ARM64_CPUID_FIELDS() helper
 - Added MOPS to hwcaps kselftest
 - Improved commit messages
 - Rebased onto v6.4-rc1
 - v1: https://lore.kernel.org/linux-arm-kernel/20230216160012.272345-1-kristina.martsenko@arm.com/


Kristina Martsenko (11):
  KVM: arm64: initialize HCRX_EL2
  arm64: cpufeature: detect FEAT_HCX
  KVM: arm64: switch HCRX_EL2 between host and guest
  arm64: mops: document boot requirements for MOPS
  arm64: mops: don't disable host MOPS instructions from EL2
  KVM: arm64: hide MOPS from guests
  arm64: mops: handle MOPS exceptions
  arm64: mops: handle single stepping after MOPS exception
  arm64: mops: detect and enable FEAT_MOPS
  arm64: mops: allow disabling MOPS from the kernel command line
  kselftest/arm64: add MOPS to hwcap test

 .../admin-guide/kernel-parameters.txt         |  3 +
 Documentation/arm64/booting.rst               |  6 ++
 Documentation/arm64/cpu-feature-registers.rst |  2 +
 Documentation/arm64/elf_hwcaps.rst            |  3 +
 arch/arm64/include/asm/el2_setup.h            | 18 +++---
 arch/arm64/include/asm/esr.h                  | 11 +++-
 arch/arm64/include/asm/exception.h            |  1 +
 arch/arm64/include/asm/hwcap.h                |  1 +
 arch/arm64/include/asm/kvm_arm.h              |  4 ++
 arch/arm64/include/uapi/asm/hwcap.h           |  1 +
 arch/arm64/kernel/cpufeature.c                | 23 ++++++++
 arch/arm64/kernel/cpuinfo.c                   |  1 +
 arch/arm64/kernel/entry-common.c              | 11 ++++
 arch/arm64/kernel/idreg-override.c            |  2 +
 arch/arm64/kernel/traps.c                     | 58 +++++++++++++++++++
 arch/arm64/kvm/hyp/include/hyp/switch.h       |  6 ++
 arch/arm64/kvm/sys_regs.c                     |  1 +
 arch/arm64/tools/cpucaps                      |  2 +
 tools/testing/selftests/arm64/abi/hwcap.c     | 22 +++++++
 19 files changed, 167 insertions(+), 9 deletions(-)


base-commit: ac9a78681b921877518763ba0e89202254349d1b
  

Comments

Catalin Marinas June 5, 2023, 5:46 p.m. UTC | #1
On Tue, 09 May 2023 15:22:24 +0100, Kristina Martsenko wrote:
> The Armv8.8 extension adds new instructions to perform memcpy(), memset() and
> memmove() operations in hardware (FEAT_MOPS). This series adds support for
> using the new instructions in userspace. More information can be found in the
> cover letter for v1:
>   https://lore.kernel.org/linux-arm-kernel/20230216160012.272345-1-kristina.martsenko@arm.com/
> 
> Changes in v2:
>  - Removed booting.rst requirement for HCRX_EL2.MCE2
>  - Changed HCRX_EL2 cpucap to be STRICT_BOOT type
>  - Changed HCRX_EL2.SMPME to be set for the guest and unset for the host
>  - Moved HCRX_EL2 initialization into init_el2_state(), dropped ISB
>  - Simplified conditional checks in mops exception handler with XOR
>  - Added comments from Arm ARM into mops exception handler
>  - Converted cpucaps to use the new ARM64_CPUID_FIELDS() helper
>  - Added MOPS to hwcaps kselftest
>  - Improved commit messages
>  - Rebased onto v6.4-rc1
>  - v1: https://lore.kernel.org/linux-arm-kernel/20230216160012.272345-1-kristina.martsenko@arm.com/
> 
> [...]

Applied to arm64 (for-next/feat_mops), thanks!

[01/11] KVM: arm64: initialize HCRX_EL2
        https://git.kernel.org/arm64/c/af94aad4c915
[02/11] arm64: cpufeature: detect FEAT_HCX
        https://git.kernel.org/arm64/c/b0c756fe996a
[03/11] KVM: arm64: switch HCRX_EL2 between host and guest
        https://git.kernel.org/arm64/c/306b4c9f7120
[04/11] arm64: mops: document boot requirements for MOPS
        https://git.kernel.org/arm64/c/f32c053b9806
[05/11] arm64: mops: don't disable host MOPS instructions from EL2
        https://git.kernel.org/arm64/c/b1319c0e9559
[06/11] KVM: arm64: hide MOPS from guests
        https://git.kernel.org/arm64/c/3172613fbcbb
[07/11] arm64: mops: handle MOPS exceptions
        https://git.kernel.org/arm64/c/8536ceaa7471
[08/11] arm64: mops: handle single stepping after MOPS exception
        https://git.kernel.org/arm64/c/8cd076a67dc8
[09/11] arm64: mops: detect and enable FEAT_MOPS
        https://git.kernel.org/arm64/c/b7564127ffcb
[10/11] arm64: mops: allow disabling MOPS from the kernel command line
        https://git.kernel.org/arm64/c/3e1dedb29d0f
[11/11] kselftest/arm64: add MOPS to hwcap test
        https://git.kernel.org/arm64/c/d8a324f102cc