diff options
| author | Oliver Upton <oliver.upton@linux.dev> | 2025-07-08 10:25:29 -0700 |
|---|---|---|
| committer | Oliver Upton <oliver.upton@linux.dev> | 2025-07-08 11:36:36 -0700 |
| commit | 2858ea3083f088a76b439f5b88b6d4f032dabc0c (patch) | |
| tree | 5ba308014b9c2453c299b41800593c1df89ab6e6 /tools/testing/selftests/kvm/include | |
| parent | KVM: arm64: Don't retire MMIO instruction w/ pending (emulated) SError (diff) | |
| download | linux-2858ea3083f088a76b439f5b88b6d4f032dabc0c.tar.gz linux-2858ea3083f088a76b439f5b88b6d4f032dabc0c.zip | |
KVM: arm64: selftests: Add basic SError injection test
Add tests for SError injection considering KVM is more directly involved
in delivery:
- Pending SErrors are taken at the first CSE after SErrors are unmasked
- Pending SErrors aren't taken and remain pending if SErrors are masked
- Unmasked SErrors are taken immediately when injected (implementation
detail)
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250708172532.1699409-25-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/testing/selftests/kvm/include')
| -rw-r--r-- | tools/testing/selftests/kvm/include/arm64/processor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/arm64/processor.h b/tools/testing/selftests/kvm/include/arm64/processor.h index b0fc0f945766..255fed769a8a 100644 --- a/tools/testing/selftests/kvm/include/arm64/processor.h +++ b/tools/testing/selftests/kvm/include/arm64/processor.h @@ -254,6 +254,16 @@ static inline void local_irq_disable(void) asm volatile("msr daifset, #3" : : : "memory"); } +static inline void local_serror_enable(void) +{ + asm volatile("msr daifclr, #4" : : : "memory"); +} + +static inline void local_serror_disable(void) +{ + asm volatile("msr daifset, #4" : : : "memory"); +} + /** * struct arm_smccc_res - Result from SMC/HVC call * @a0-a3 result values from registers 0 to 3 |
