Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1998990iob; Thu, 5 May 2022 12:54:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykPsacH0OVRRgReHMfdCmmcfmzeikJe0N/q/M61qPToHM2HRRH2e54anqHbDRK8RXLaZRN X-Received: by 2002:a17:907:2d93:b0:6f3:8524:6f92 with SMTP id gt19-20020a1709072d9300b006f385246f92mr28023984ejc.556.1651780462859; Thu, 05 May 2022 12:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651780462; cv=none; d=google.com; s=arc-20160816; b=rn2d3pbTNmVfsf0qPXrc9eFuIH443zzUbPQ5UmO/XgogfGK2shmbGFk9RydemquLwc NAaaT9zgCMHj6mE0F7R0272rcloUtpBY1hx+NE/ClGSuUkXDHc+hfkpVtnabSYUZOWOw fR0mNWyGTrBnrF7+/uPMol/cWrVubl6ut3Gdo5XJhGpEKVbXE5p+SYqWI9+kp6yuwD5+ cnBh5XgU7dyLm+eZ/3HXaK17IqK3aR5mJJkSKHQWaQrw79egPiZB0SnO5HyVIKoICvhW LZYb1tzBDMWVIx7finentsXR2h/AfirJB0f6qhzbkLg6H/MiKSem93AcTIRw69qGL81y 11ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cI3EnEiByhbyzhbmPT2Do41vovNa54bp0yAEgXmkBD8=; b=IlcxKXESRqBad1st2HMQnpft05nSeuiOYd3AqJNWSsQbJmf0bE4p6RavcNdfyBvdMj 60BZ0aH8EW3+rMUDfpbu6PAwqwjbz8b4nYnbhJ5JI53n/Ae8LfviX+VTydN8gq9aaSfn sLcxlTaIqtfd+PtJeEWeI+wTQY5hqZhr9nzK+UE32pYTT1JDGX9He5h/KSAVGcwAKC9b VFtX2Ejxjk+GF4dsu9O7fcCSJq/+A90TwNzp9T98NL1c7NNTKsuCNBlGF1yvsYQL54Tx qkvtQhJh7MpIOJWUAqViJq6fhUg9NmmuGAWMxYVPWmahBeVxAQzskjwiBxFzrOZg5Ti+ KZyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=mmI6KLpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bo20-20020a0564020b3400b00427c7649503si2677555edb.628.2022.05.05.12.53.58; Thu, 05 May 2022 12:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=mmI6KLpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343952AbiEDCSY (ORCPT + 99 others); Tue, 3 May 2022 22:18:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343873AbiEDCSY (ORCPT ); Tue, 3 May 2022 22:18:24 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C50F92A72F for ; Tue, 3 May 2022 19:14:49 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id j2so245387ybu.0 for ; Tue, 03 May 2022 19:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cI3EnEiByhbyzhbmPT2Do41vovNa54bp0yAEgXmkBD8=; b=mmI6KLpp+c3z+QrHZdFKRJi6VoSF3GbpLtggCsIulsB7AubvolFrXmPGCEXTxlZANN f3DhMSm2PnbBoAetcz8hC4H9bKeaHz8TGfKNNSG94OErYzJkMD2FdlSJfm7Xj0+v6vUA nsviC93U75RbKSwrPBpYDtKRlXaAU8h4VESOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cI3EnEiByhbyzhbmPT2Do41vovNa54bp0yAEgXmkBD8=; b=AtZVsIWygMr4oa9kKrE4jfxbtOAKR5XIEIDpOQ70AtgeDxrLzoH//G0lNIOWXsNggM uCZ7vBnAkI/4Tk96+cDJivgk1NwumVl6hhzXBXzeG7pT3eMxZ7xLByui7BxHNY+7fFkd ZKhMQTZbEJeWCK/ulgMFNVvLuFraUTZrXHErZG9MKZB6JNhpzVNgnWwe4PC6Hsj+mmdv s6IIAJn6VfeenXbfo32+KN6zI7G9W0lnA7p5k7e93wzXg9E8OIIzyMJqvZsw1S2BFEYR D8tMnWbeOhmwFqEI2qis0RrvmWRR6BGZk11r7HPaLY+MO2Nfl4zkSLwwOzYPexRaCsoE j5aw== X-Gm-Message-State: AOAM533Rg46m4DPzajo++Q7iqlh5TJKQ6lleIeCvxN/42jiQb8HXcTC1 2qjOp47KyXsHfrPIimwCmC02AFYNluOyBtm6t+HP X-Received: by 2002:a25:9247:0:b0:645:ddd5:a182 with SMTP id e7-20020a259247000000b00645ddd5a182mr16046065ybo.289.1651630489026; Tue, 03 May 2022 19:14:49 -0700 (PDT) MIME-Version: 1.0 References: <20220420112450.155624-1-apatel@ventanamicro.com> <20220420112450.155624-4-apatel@ventanamicro.com> In-Reply-To: <20220420112450.155624-4-apatel@ventanamicro.com> From: Atish Patra Date: Tue, 3 May 2022 19:14:38 -0700 Message-ID: Subject: Re: [PATCH v2 3/7] RISC-V: KVM: Treat SBI HFENCE calls as NOPs To: Anup Patel Cc: Paolo Bonzini , Palmer Dabbelt , Paul Walmsley , Alistair Francis , Anup Patel , KVM General , kvm-riscv@lists.infradead.org, linux-riscv , "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 20, 2022 at 4:25 AM Anup Patel wrote: > > 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 > --- > arch/riscv/kvm/vcpu_sbi_replace.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > 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; > } > -- > 2.25.1 > Reviewed-by: Atish Patra -- Regards, Atish