]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs
authorAnup Patel <apatel@ventanamicro.com>
Thu, 5 Jun 2025 06:14:47 +0000 (11:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:41 +0000 (11:07 +0100)
commit9bcafbd27002019954bda309910c2425c459702f
tree297b25736bfcfd11bc3e2c91ee9cb339a06e2477
parent8a8b342332e27280e48d0f7013d70b4e688947af
RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs

[ Upstream commit 2e7be162996640bbe3b6da694cc064c511b8a5d9 ]

The SBI specification clearly states that SBI HFENCE calls should
return SBI_ERR_NOT_SUPPORTED when one of the target hart doesn’t
support hypervisor extension (aka nested virtualization in-case
of KVM RISC-V).

Fixes: c7fa3c48de86 ("RISC-V: KVM: Treat SBI HFENCE calls as NOPs")
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/r/20250605061458.196003-3-apatel@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/riscv/kvm/vcpu_sbi_replace.c