riscv: misaligned: add a function to check misalign trap delegability
authorClément Léger <cleger@rivosinc.com>
Fri, 23 May 2025 10:19:27 +0000 (12:19 +0200)
committerPalmer Dabbelt <palmer@dabbelt.com>
Wed, 4 Jun 2025 22:11:07 +0000 (15:11 -0700)
commit7977448bf374f6e9592153838f072a89bd3b5c45
tree15c49646818bbfa152f7a8caa236b837ee5dd386
parent4eaaa65e301208d6ff612ad2244c6174c9d852b8
riscv: misaligned: add a function to check misalign trap delegability

Checking for the delegability of the misaligned access trap is needed
for the KVM FWFT extension implementation. Add a function to get the
delegability of the misaligned trap exception.

Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Tested-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20250523101932.1594077-11-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
arch/riscv/include/asm/cpufeature.h
arch/riscv/kernel/traps_misaligned.c