The XSAVE feature set supports the saving and restoring of state components,
and XSAVE feature is used for process context switching. The XSAVE state
components include x87 state for FPU execution environment, SSE state, AVX
state and so on. In order to ensure that XSAVE works correctly, add XSAVE
basic test for XSAVE architecture functionality.
This patch set tests and verifies the basic functions of XSAVE/XRSTOR in
user space; during and after signal handling on the x86 platform, the
XSAVE contents of the process should not be changed.
This series introduces only the most basic XSAVE tests. In the
future, the intention is to continue expanding the scope of
these selftests to include more kernel XSAVE-related functionality
and XSAVE-managed features like AMX and shadow stacks.
Pengfei Xu (2):
selftests/xsave: test basic XSAVE architecture functionality
selftests/xsave: add xsave test during and after signal handling
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/xsave/.gitignore | 3 +
tools/testing/selftests/xsave/Makefile | 6 +
tools/testing/selftests/xsave/xsave_common.h | 246 ++++++++++++++++++
.../selftests/xsave/xsave_instruction.c | 83 ++++++
.../selftests/xsave/xsave_signal_handle.c | 184 +++++++++++++
6 files changed, 523 insertions(+)
create mode 100644 tools/testing/selftests/xsave/.gitignore
create mode 100644 tools/testing/selftests/xsave/Makefile
create mode 100644 tools/testing/selftests/xsave/xsave_common.h
create mode 100644 tools/testing/selftests/xsave/xsave_instruction.c
create mode 100644 tools/testing/selftests/xsave/xsave_signal_handle.c
--
2.20.1
Extend KSM self tests with a performance benchmark. These tests are not
part of regular regression testing, as they are mainly intended to be
used by developers making changes to the memory management subsystem.
Both patches were developed against linux-next.
Zhansaya Bagdauletkyzy (2):
selftests: vm: add KSM merging time test
selftests: vm: add COW time test for KSM pages
tools/testing/selftests/vm/ksm_tests.c | 136 ++++++++++++++++++++++++-
1 file changed, 132 insertions(+), 4 deletions(-)
--
2.25.1
Currently we don't have full automated tests for the vector length
configuation ABIs offered for SVE, we have a helper binary for setting
the vector length which can be used for manual tests and we use the
prctl() interface to enumerate the vector lengths but don't actually
verify that the vector lengths enumerated were set.
This patch series provides a small helper which allows us to get the
currently configured vector length using the RDVL instruction via either
a library call or stdout of a process and then uses this to both add
verification of enumerated vector lengths to our existing tests and also
add a new test program which exercises both the prctl() and sysfs
interfaces.
In preparation for the forthcomng support for the Scalable Matrix
Extension (SME) [1] which introduces a new vector length managed via a
very similar hardware interface the helper and new test program are
parameterised with the goal of allowing reuse for SME.
[1] https://community.arm.com/developer/ip-products/processors/b/processors-ip-…
v5:
- Fix a potentially uninialized variable case.
- Clarify an error message.
- Add TODO.
v4:
- Fix fscanf() format string handling to properly confirm the newline.
- Pull fclose() out of stdio read helper.
- Change style of child monitoring loop.
v3:
- Add BTI landing pads to the asm helper functions.
- Clean up pipes used to talk to children.
- Remove another unneeded include.
- Make functions in the main executable static.
- Match the newline when parsing vector length from the child.
- Factor out the fscanf() and fclose() from parsing integers from file
descriptors.
- getauxval() returns unsigned long.
v2:
- Tweak log message on failure in sve-probe-vls.
- Stylistic changes in vec-syscfg.
- Flush stdout before forking in vec-syscfg.
- Use EXIT_FAILURE.
- Use fdopen() to get child output.
- Replace a bunch of UNIX API usage with stdio.
- Add a TODO list.
- Verify that we're root before testing writes to /proc.
Mark Brown (4):
kselftest/arm64: Provide a helper binary and "library" for SVE RDVL
kselftest/arm64: Validate vector lengths are set in sve-probe-vls
kselftest/arm64: Add tests for SVE vector configuration
kselftest/arm64: Add a TODO list for floating point tests
tools/testing/selftests/arm64/fp/.gitignore | 2 +
tools/testing/selftests/arm64/fp/Makefile | 11 +-
tools/testing/selftests/arm64/fp/TODO | 4 +
tools/testing/selftests/arm64/fp/rdvl-sve.c | 14 +
tools/testing/selftests/arm64/fp/rdvl.S | 10 +
tools/testing/selftests/arm64/fp/rdvl.h | 8 +
.../selftests/arm64/fp/sve-probe-vls.c | 5 +
tools/testing/selftests/arm64/fp/vec-syscfg.c | 593 ++++++++++++++++++
8 files changed, 644 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/arm64/fp/TODO
create mode 100644 tools/testing/selftests/arm64/fp/rdvl-sve.c
create mode 100644 tools/testing/selftests/arm64/fp/rdvl.S
create mode 100644 tools/testing/selftests/arm64/fp/rdvl.h
create mode 100644 tools/testing/selftests/arm64/fp/vec-syscfg.c
base-commit: ff1176468d368232b684f75e82563369208bc371
--
2.20.1
Currently we don't have full automated tests for the vector length
configuation ABIs offered for SVE, we have a helper binary for setting
the vector length which can be used for manual tests and we use the
prctl() interface to enumerate the vector lengths but don't actually
verify that the vector lengths enumerated were set.
This patch series provides a small helper which allows us to get the
currently configured vector length using the RDVL instruction via either
a library call or stdout of a process and then uses this to both add
verification of enumerated vector lengths to our existing tests and also
add a new test program which exercises both the prctl() and sysfs
interfaces.
In preparation for the forthcomng support for the Scalable Matrix
Extension (SME) [1] which introduces a new vector length managed via a
very similar hardware interface the helper and new test program are
parameterised with the goal of allowing reuse for SME.
[1] https://community.arm.com/developer/ip-products/processors/b/processors-ip-…
v3:
- Add BTI landing pads to the asm helper functions.
- Clean up pipes used to talk to children.
- Remove another unneeded include.
- Make functions in the main executable static.
- Match the newline when parsing vector length from the child.
- Factor out the fscanf() and fclose() from parsing integers from file
descriptors.
- getauxval() returns unsigned long.
v2:
- Tweak log message on failure in sve-probe-vls.
- Stylistic changes in vec-syscfg.
- Flush stdout before forking in vec-syscfg.
- Use EXIT_FAILURE.
- Use fdopen() to get child output.
- Replace a bunch of UNIX API usage with stdio.
- Add a TODO list.
- Verify that we're root before testing writes to /proc.
Mark Brown (4):
kselftest/arm64: Provide a helper binary and "library" for SVE RDVL
kselftest/arm64: Validate vector lengths are set in sve-probe-vls
kselftest/arm64: Add tests for SVE vector configuration
kselftest/arm64: Add a TODO list for floating point tests
tools/testing/selftests/arm64/fp/.gitignore | 2 +
tools/testing/selftests/arm64/fp/Makefile | 11 +-
tools/testing/selftests/arm64/fp/TODO | 3 +
tools/testing/selftests/arm64/fp/rdvl-sve.c | 14 +
tools/testing/selftests/arm64/fp/rdvl.S | 10 +
tools/testing/selftests/arm64/fp/rdvl.h | 8 +
.../selftests/arm64/fp/sve-probe-vls.c | 5 +
tools/testing/selftests/arm64/fp/vec-syscfg.c | 594 ++++++++++++++++++
8 files changed, 644 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/arm64/fp/TODO
create mode 100644 tools/testing/selftests/arm64/fp/rdvl-sve.c
create mode 100644 tools/testing/selftests/arm64/fp/rdvl.S
create mode 100644 tools/testing/selftests/arm64/fp/rdvl.h
create mode 100644 tools/testing/selftests/arm64/fp/vec-syscfg.c
base-commit: ff1176468d368232b684f75e82563369208bc371
--
2.20.1
Currently we don't have full automated tests for the vector length
configuation ABIs offered for SVE, we have a helper binary for setting
the vector length which can be used for manual tests and we use the
prctl() interface to enumerate the vector lengths but don't actually
verify that the vector lengths enumerated were set.
This patch series provides a small helper which allows us to get the
currently configured vector length using the RDVL instruction via either
a library call or stdout of a process and then uses this to both add
verification of enumerated vector lengths to our existing tests and also
add a new test program which exercises both the prctl() and sysfs
interfaces.
In preparation for the forthcomng support for the Scalable Matrix
Extension (SME) [1] which introduces a new vector length managed via a
very similar hardware interface the helper and new test program are
parameterised with the goal of allowing reuse for SME.
[1] https://community.arm.com/developer/ip-products/processors/b/processors-ip-…
v3:
- Add BTI landing pads to the asm helper functions.
- Clean up pipes used to talk to children.
- Remove another unneeded include.
- Make functions in the main executable static.
- Match the newline when parsing vector length from the child.
- Factor out the fscanf() and fclose() from parsing integers from file
descriptors.
- getauxval() returns unsigned long.
v2:
- Tweak log message on failure in sve-probe-vls.
- Stylistic changes in vec-syscfg.
- Flush stdout before forking in vec-syscfg.
- Use EXIT_FAILURE.
- Use fdopen() to get child output.
- Replace a bunch of UNIX API usage with stdio.
- Add a TODO list.
- Verify that we're root before testing writes to /proc.
Mark Brown (4):
kselftest/arm64: Provide a helper binary and "library" for SVE RDVL
kselftest/arm64: Validate vector lengths are set in sve-probe-vls
kselftest/arm64: Add tests for SVE vector configuration
kselftest/arm64: Add a TODO list for floating point tests
tools/testing/selftests/arm64/fp/.gitignore | 2 +
tools/testing/selftests/arm64/fp/Makefile | 11 +-
tools/testing/selftests/arm64/fp/TODO | 3 +
tools/testing/selftests/arm64/fp/rdvl-sve.c | 14 +
tools/testing/selftests/arm64/fp/rdvl.S | 10 +
tools/testing/selftests/arm64/fp/rdvl.h | 8 +
.../selftests/arm64/fp/sve-probe-vls.c | 5 +
tools/testing/selftests/arm64/fp/vec-syscfg.c | 594 ++++++++++++++++++
8 files changed, 644 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/arm64/fp/TODO
create mode 100644 tools/testing/selftests/arm64/fp/rdvl-sve.c
create mode 100644 tools/testing/selftests/arm64/fp/rdvl.S
create mode 100644 tools/testing/selftests/arm64/fp/rdvl.h
create mode 100644 tools/testing/selftests/arm64/fp/vec-syscfg.c
base-commit: ff1176468d368232b684f75e82563369208bc371
--
2.20.1