Commit e0ccc45b authored by Mark Brown's avatar Mark Brown Committed by Marc Zyngier
Browse files

KVM: arm64: selftests: Add test for SVE host corruption



Until recently, the kernel could unexpectedly discard SVE state for a
period after a KVM_RUN ioctl, when the guest did not execute any
FPSIMD/SVE/SME instructions. We fixed that issue in commit:

  fbc7e611 ("KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state")

Add a test which tries to provoke that issue by manipulating SVE state
before/after running a guest which does not execute any FPSIMD/SVE/SME
instructions. The test executes a handful of iterations to miminize
the risk that the issue is masked by preemption.

Signed-off--by: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20250417-kvm-selftest-sve-signal-v1-1-6330c2f3da0c@kernel.org


[maz: Restored MR's SoB, fixed commit message according to MR's write-up]
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
parent bae247cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment