Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	 Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>, Oliver Upton <oupton@kernel.org>,
	 Fuad Tabba <fuad.tabba@linux.dev>,
	Mark Rutland <mark.rutland@arm.com>,
	 linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-kselftest@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: [PATCH 00/11] kselftest/arm64: Add coverage of interactions with KVM to fp-stress
Date: Tue, 01 Sep 2026 18:06:40 +0100	[thread overview]
Message-ID: <20260901-arm64-fp-stress-kvm-v1-0-31bce995b49b@kernel.org> (raw)

Presently we don't have any automatic stress testing for the handling of
floating point save and restore with KVM, nor it's interaction with the
host's management of the floating point registers.  The majority of the
focused stress testing has been done by running the existing fp-stress
selftest on the host, starting a guest and then running fp-stress in
there too but this has been a manual process rather than something done
as a matter of routine by CI.

Plug this gap by reworking the test loads so that they can be run as KVM
guests, using a simple VMM that provides the interface that fp-stress
expects from it's test loads.  We run the FPSIMD and SVE tests in KVM
guests for half the CPUs, if EL2 is available then half the KVM tests
will use it.  The tests run in a minimal environment with the VMM and
test binaries tightly coupled to each other.

There's more coverage could be added, but this is an improvement over
the current situation and can be built on in future.  Off the top of my
head:

 - We only test nested guests running at EL2 with E2H set.
 - We only run the guests at the highest VL they support.
 - Enabling the MMU would avoid surprises due to the performance
   differences.
 - We do not run any protected guests (this currently taints the kernel
   so should wait until the pKVM support is less experimental).
 - It might be useful to have the VMM signal handler save and restore
   the guest register state to exercise that path.
 - Possibly it would be useful to disable irrelevant features so less
   time is spent context switching non-FP state?

Signed-off-by: Mark Brown <broonie@kernel.org>
---
Mark Brown (11):
      kselftest/arm64: Factor Linux syscalls out of asm-utils.S
      kselftest/arm64: Factor shared signal handlers out of fp-stress loads
      kselftest/arm64: Move exit calls out of fp-stress loads
      kselftest/arm64: Use exit_error() rather than SIGABRT in fp-stress
      kselftest/arm64: Exit with an error code on data mismatches in fp-stress
      kselftest/arm64: Factor startup code out of fp-stress load programs
      kselftest/arm64: Remove the sched_yield()s from the fp-stress loads
      kselftest/arm64: Add a very simple VMM for use in fp-stress
      kselftest/arm64: Build KVM guest versions of the fp-stress loads
      kselftest/arm64: Use execv() to start fp-stress test loads
      kselftest/arm64: Run KVM guests from fp-stress

 tools/testing/selftests/arm64/fp/.gitignore        |   4 +
 tools/testing/selftests/arm64/fp/Makefile          |  64 ++-
 tools/testing/selftests/arm64/fp/asm-utils-kvm.S   |  86 +++
 tools/testing/selftests/arm64/fp/asm-utils-linux.S | 181 +++++++
 tools/testing/selftests/arm64/fp/asm-utils.S       |  36 --
 tools/testing/selftests/arm64/fp/fp-pidbench.S     |   6 +-
 .../testing/selftests/arm64/fp/fp-stress-kvm.lds.S |  58 ++
 tools/testing/selftests/arm64/fp/fp-stress-vmm.c   | 596 +++++++++++++++++++++
 tools/testing/selftests/arm64/fp/fp-stress-vmm.h   |  17 +
 tools/testing/selftests/arm64/fp/fp-stress.c       | 230 +++++++-
 tools/testing/selftests/arm64/fp/fpsimd-test.S     | 121 +----
 tools/testing/selftests/arm64/fp/sve-test.S        | 139 +----
 tools/testing/selftests/arm64/fp/za-test.S         | 138 +----
 tools/testing/selftests/arm64/fp/zt-test.S         | 131 +----
 14 files changed, 1244 insertions(+), 563 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20250401-arm64-fp-stress-kvm-4720ca307da4

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



             reply	other threads:[~2026-09-01 17:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 17:06 Mark Brown [this message]
2026-09-01 17:06 ` [PATCH 01/11] kselftest/arm64: Factor Linux syscalls out of asm-utils.S Mark Brown
2026-09-01 17:06 ` [PATCH 02/11] kselftest/arm64: Factor shared signal handlers out of fp-stress loads Mark Brown
2026-09-01 17:06 ` [PATCH 03/11] kselftest/arm64: Move exit calls " Mark Brown
2026-09-01 17:06 ` [PATCH 04/11] kselftest/arm64: Use exit_error() rather than SIGABRT in fp-stress Mark Brown
2026-09-01 17:06 ` [PATCH 05/11] kselftest/arm64: Exit with an error code on data mismatches " Mark Brown
2026-09-01 17:06 ` [PATCH 06/11] kselftest/arm64: Factor startup code out of fp-stress load programs Mark Brown
2026-09-01 17:06 ` [PATCH 07/11] kselftest/arm64: Remove the sched_yield()s from the fp-stress loads Mark Brown
2026-09-01 17:06 ` [PATCH 08/11] kselftest/arm64: Add a very simple VMM for use in fp-stress Mark Brown
2026-09-01 17:06 ` [PATCH 09/11] kselftest/arm64: Build KVM guest versions of the fp-stress loads Mark Brown
2026-09-01 17:06 ` [PATCH 10/11] kselftest/arm64: Use execv() to start fp-stress test loads Mark Brown
2026-09-01 17:06 ` [PATCH 11/11] kselftest/arm64: Run KVM guests from fp-stress Mark Brown

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=20260901-arm64-fp-stress-kvm-v1-0-31bce995b49b@kernel.org \
    --to=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=fuad.tabba@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=shuah@kernel.org \
    --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