linux/tools/arch
Yicong Yang 52c6b7d20d RISC-V: KVM: Fix the conversion between vsip and hvip
Per AIA spec 1.0 Section 6.3.2, the interrupt numbers 13-63
shares same bit position between related VS shadow CSRs and
hypervisor CSRs. So there's a shift only for SSI, STI and
SEI interrupt.

Currently the KVM always does a shift for all the interrupts
(include LCOFI with number 13) when doing the conversion
between vsip and hvip. Fix this by only doing shift the SSI,
STI and SEI. Add wrappers for doing the conversion between
vsip and hvip.

Fixes: 16b0bde9a3 ("RISC-V: KVM: Add perf sampling support for guests")
Signed-off-by: Yicong Yang <yang.yicong@picoheart.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260804134018.85497-1-yang.yicong@picoheart.com
Signed-off-by: Anup Patel <anup@brainfault.org>
2026-09-15 18:55:51 +05:30
..
alpha/include openat2: introduce EFTYPE error code 2026-05-21 10:53:41 +02:00
arc/include/uapi/asm
arm/include tools headers: Remove unused arm32 asm/kvm.h copy 2025-09-11 16:58:21 -03:00
arm64 KVM: arm64: gic-v5: Communicate userspace-driveable PPIs via a UAPI 2026-03-19 18:21:29 +00:00
csky/include/uapi/asm
hexagon/include/uapi/asm
loongarch/include objtool/LoongArch: Mark special atomic instruction as INSN_BUG type 2025-09-18 19:43:36 +08:00
microblaze/include/uapi/asm
mips/include openat2: introduce EFTYPE error code 2026-05-21 10:53:41 +02:00
parisc/include/uapi/asm openat2: introduce EFTYPE error code 2026-05-21 10:53:41 +02:00
powerpc/include tools headers: Sync powerpc headers with the kernel source 2025-08-18 13:49:25 -07:00
riscv/include RISC-V: KVM: Fix the conversion between vsip and hvip 2026-09-15 18:55:51 +05:30
s390/include tools headers: Sync KVM headers with the kernel sources 2026-07-21 21:00:10 -03:00
sh/include
sparc/include openat2: introduce EFTYPE error code 2026-05-21 10:53:41 +02:00
x86 - Remove the smp_locks alternatives machinery which was used to patch out lock 2026-08-18 18:11:25 -07:00
xtensa/include