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)
committerAnup Patel <anup@brainfault.org>
Tue, 17 Jun 2025 04:48:40 +0000 (10:18 +0530)
commit2e7be162996640bbe3b6da694cc064c511b8a5d9
tree557964eb02660bca62c763f1be41ec92a0ee0690
parent6aba0cb5bba6141158d5449f2cf53187b7f755f9
RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs

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>
arch/riscv/kvm/vcpu_sbi_replace.c