]> git.ipfire.org Git - thirdparty/linux.git/commit
RISC-V: KVM: fix PMU snapshot_set_shmem on 32-bit hosts
authorOsama Abdelkader <osama.abdelkader@gmail.com>
Wed, 11 Mar 2026 23:18:32 +0000 (00:18 +0100)
committerAnup Patel <anup@brainfault.org>
Fri, 27 Mar 2026 13:02:37 +0000 (18:32 +0530)
commitaa35bcf2e76234fef7bbca9bf364039692a27661
tree75701a5aa58ee2ebf5ac2370b95e896260914731
parent7c61e7433b49ca948dc8cc2b70a20b3dbc36363d
RISC-V: KVM: fix PMU snapshot_set_shmem on 32-bit hosts

When saddr_high != 0 on RV32, the goto out was unconditional, causing
valid 64-bit addresses to be rejected. Only goto out when the address
is invalid (64-bit host with saddr_high != 0).

Fixes: c2f41ddbcdd7 ("RISC-V: KVM: Implement SBI PMU Snapshot feature")
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Andrew Jones <andrew.jones@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260311231833.13189-1-osama.abdelkader@gmail.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu_pmu.c