From: Anup Patel Date: Mon, 9 May 2022 05:13:46 +0000 (+0530) Subject: RISC-V: KVM: Treat SBI HFENCE calls as NOPs X-Git-Tag: howlett/maple/20220722_2~444^2~11^2~6 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c7fa3c48de86053b0f1949fa5532082544e30fce;p=users%2Fjedix%2Flinux-maple.git 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 Reviewed-by: Atish Patra Signed-off-by: Anup Patel --- diff --git a/arch/riscv/kvm/vcpu_sbi_replace.c b/arch/riscv/kvm/vcpu_sbi_replace.c index 0f217365c287..3c1dcd38358e 100644 --- a/arch/riscv/kvm/vcpu_sbi_replace.c +++ b/arch/riscv/kvm/vcpu_sbi_replace.c @@ -117,7 +117,11 @@ static int kvm_sbi_ext_rfence_handler(struct kvm_vcpu *vcpu, struct kvm_run *run case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID: case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA: case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID: - /* TODO: implement for nested hypervisor case */ + /* + * Until nested virtualization is implemented, the + * SBI HFENCE calls should be treated as NOPs + */ + break; default: ret = -EOPNOTSUPP; }