]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: KVM: Fix hart suspend status check
authorAndrew Jones <ajones@ventanamicro.com>
Mon, 17 Feb 2025 08:45:08 +0000 (09:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2025 17:25:36 +0000 (18:25 +0100)
commit5ecf68c8834ba4e5b0b8ebdfad2bebf3daf8b8d1
treed67ad830886a0c503e14d2c15f27e8590f24c160
parentfaccabe9c1c9d6c9f6e668f69e5b1db05c20c4a8
riscv: KVM: Fix hart suspend status check

[ Upstream commit c7db342e3b4744688be1e27e31254c1d31a35274 ]

"Not stopped" means started or suspended so we need to check for
a single state in order to have a chance to check for each state.
Also, we need to use target_vcpu when checking for the suspend
state.

Fixes: 763c8bed8c05 ("RISC-V: KVM: Implement SBI HSM suspend call")
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250217084506.18763-8-ajones@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/kvm/vcpu_sbi_hsm.c