Add a test case that does some basic verification of the SVE ptrace interface, forking off a child with known values in the registers and then using ptrace to inspect and manipulate the SVE registers of the child, including in FPSIMD mode to account for sharing between the SVE and FPSIMD registers. This program was written by Dave Martin and modified for kselftest by me. Signed-off-by: Mark Brown <broonie@kernel.org> Acked-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20200819114837.51466-3-broonie@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
34 lines
547 B
ArmAsm
34 lines
547 B
ArmAsm
// SPDX-License-Identifier: GPL-2.0-only
|
|
// Copyright (C) 2015-2019 ARM Limited.
|
|
// Original author: Dave Martin <Dave.Martin@arm.com>
|
|
#include <asm/unistd.h>
|
|
|
|
.arch_extension sve
|
|
|
|
.globl sve_store_patterns
|
|
|
|
sve_store_patterns:
|
|
mov x1, x0
|
|
|
|
index z0.b, #0, #1
|
|
str q0, [x1]
|
|
|
|
mov w8, #__NR_getpid
|
|
svc #0
|
|
str q0, [x1, #0x10]
|
|
|
|
mov z1.d, z0.d
|
|
str q0, [x1, #0x20]
|
|
|
|
mov w8, #__NR_getpid
|
|
svc #0
|
|
str q0, [x1, #0x30]
|
|
|
|
mov z1.d, z0.d
|
|
str q0, [x1, #0x40]
|
|
|
|
ret
|
|
|
|
.size sve_store_patterns, . - sve_store_patterns
|
|
.type sve_store_patterns, @function
|