Skip to content

Commit c7fa3c4

Browse files
committed
RISC-V: KVM: Treat SBI HFENCE calls as NOPs
We should treat SBI HFENCE calls as NOPs until nested virtualization is supported by KVM RISC-V. This will help us test booting a hypervisor under KVM RISC-V. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent b4bbb95 commit c7fa3c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/riscv/kvm/vcpu_sbi_replace.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ static int kvm_sbi_ext_rfence_handler(struct kvm_vcpu *vcpu, struct kvm_run *run
117117
case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID:
118118
case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA:
119119
case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID:
120-
/* TODO: implement for nested hypervisor case */
120+
/*
121+
* Until nested virtualization is implemented, the
122+
* SBI HFENCE calls should be treated as NOPs
123+
*/
124+
break;
121125
default:
122126
ret = -EOPNOTSUPP;
123127
}

0 commit comments

Comments
 (0)