Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4850740iob; Mon, 9 May 2022 03:10:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxOgm5suDGwE1p5b7bbycu9rz3DOrvC+HeGpTnLsWgcUb3m4oaQw0o8iFfN0ZfSMnPsLae X-Received: by 2002:a17:90a:c246:b0:1d9:3a2e:5495 with SMTP id d6-20020a17090ac24600b001d93a2e5495mr26028982pjx.170.1652091017876; Mon, 09 May 2022 03:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652091017; cv=none; d=google.com; s=arc-20160816; b=f50VUggAylFsAhcuiYWBxrtlMLVtT3K85uGnBh7oY2Ip4yamdfSrvxAcaPtY7FL+sz LYHwfNuZGmdJ2+VGsCFm9qq1YrTdNmoRIDYtOgXfFnX28hjw0TOdirgHF4vedLZaVGBl q/tg3F/ER7q0mog8ZNrCuKpYvmyqM28AjPKwwKkOYEo1TbQeeulBtAIs/J9TlsgYjuB5 SN64LHXWFE63L+vqXeTAubSc3bARoHIKxD9OBA8RAU1jh50vvWrlE1qPfI6r4rD5lo/g IyBPGvrU+5zCS3cpxp3ScStX1/+7bX1kkGyhNGFEjmFLCwcD90t+w+S79sQswTpZeFRv wtlA== 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=TtVlY+C8hBffv2WPWsAMedVX+O+Qs5k+jY37q9IS2fI=; b=KFLFJHLlW0cjlvfAdKMoLgSYZZIL2GF0qH3pERZcyvJbQ4xrihgXuiXq27KoK9znLE 0BeyrtORBGpXuPDvp9gaD9OMOlQR97ivtM+XoQ38JW5v881D+1ZUITcnbjZyUXERfsW7 Z+W3GpFWtQbNXU53Q3wH2saIF5hlwUxvI8d1gsvTzW92mnCQLde0xVxYfSsZLH43hGL4 hSblyj6iIeQTS7blVXhjbtIy8nPP4A3y5g1Vrgu2mOWY8xK18iP7fr8t1oZuxgj1kHmx qnxgV+fsVy+VX0zUSJIqFyFlAjGq2GU2QwfLyEn9rfk8RW7rxkJs/3LsMM667Bo9zMRZ 0hKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=0vsykZ6e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m5-20020a170902db0500b00155e8c68779si13112618plx.601.2022.05.09.03.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:10:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=0vsykZ6e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B86752370ED; Mon, 9 May 2022 02:49:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234203AbiEIFiH (ORCPT + 99 others); Mon, 9 May 2022 01:38:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233733AbiEIFg1 (ORCPT ); Mon, 9 May 2022 01:36:27 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA5301110CC for ; Sun, 8 May 2022 22:32:34 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id b19so17794200wrh.11 for ; Sun, 08 May 2022 22:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TtVlY+C8hBffv2WPWsAMedVX+O+Qs5k+jY37q9IS2fI=; b=0vsykZ6evwtInjYhpdg1T3hdzuqsT6eE8R38QmPbmqijiPuhM+01C1O3V6PEv8x1td 4mWBAFpOgYgyila+zVnf5YjPy9YR37wmU1+LZde6kEOTD1xtW1GukTWOElwTGFT3c28V mBR0gJjrJmOE2Ml8f5MgvGUNNZQdDAp/et0x9ddlnz+p+i74yUPBB+8ldCkkb8sVEgkF YAxP1zmD2GXOZLOYcwz3jgZj/4ZAmPib00IQhCemqwIoOO2qpTaI1CBsC3hzYzr0M9XH J1znsFDFy2BZU6ctDL6CVlD5z/LAzhU5Uxh7wd7GJ5B+d/Dge1CbcsAR69slnGd81vE1 oyMQ== 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=TtVlY+C8hBffv2WPWsAMedVX+O+Qs5k+jY37q9IS2fI=; b=ofzpokFCm94nSJ9qg4sE3P3N+DhJgkzrj5aqy/Xvv7IHvIdTMcWpfn1igPYzXwahdh tKlf57Fcdsy/BapvQ6fK0FoxlAmo6bik96OLLJJfgoQF6L872ux5xuW7huWtsCg1xUQc zotfsO5G+7vTVIGieG2wyg6qdb/Pky7hnF6IhKq7DnmuSPEWlNidkmiS/xl48C/jhf39 zTK8wq1UGGmcue/BM3i6qFXldNVm1pOr1EmuvSZBVgvBkrt8Q5bYnjS3pm3hI430Svhr OcE2Q5BEITcBTjmtmSnpbhS6uCXI2YBNQtjVNc4HWInyvJkiNvdD6+FCr59DjdZjFYAb 7ldA== X-Gm-Message-State: AOAM533rco7MXxnXZf+iJUlL9xNu/9UXVEegYY7fDl76Hkz6AsN68Icx +5PQbXRHUAuSb8o7CUdNCMpcprDZUMaWIUqAH8p0MfYfr+bb8Q== X-Received: by 2002:a05:6000:799:b0:20c:6e3c:a28c with SMTP id bu25-20020a056000079900b0020c6e3ca28cmr12234422wrb.346.1652074353208; Sun, 08 May 2022 22:32:33 -0700 (PDT) MIME-Version: 1.0 References: <20220420112450.155624-1-apatel@ventanamicro.com> <20220420112450.155624-4-apatel@ventanamicro.com> In-Reply-To: From: Anup Patel Date: Mon, 9 May 2022 11:02:21 +0530 Message-ID: Subject: Re: [PATCH v2 3/7] RISC-V: KVM: Treat SBI HFENCE calls as NOPs To: Atish Patra Cc: Anup Patel , Paolo Bonzini , Palmer Dabbelt , Paul Walmsley , Alistair Francis , KVM General , "open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)" , linux-riscv , "linux-kernel@vger.kernel.org List" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, May 4, 2022 at 7:44 AM Atish Patra wrote: > > 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 Queued this patch for 5.19 Thanks, Anup > -- > Regards, > Atish