Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp753386rwl; Fri, 7 Apr 2023 05:06:32 -0700 (PDT) X-Google-Smtp-Source: AKy350Yb5nk2Y7cSKKnDsPWZldyyZ/qp45iyvH+M5yzCz+1MnqjhEW2CWLrsyGVCfH5XthaKkxv6 X-Received: by 2002:a17:907:98ab:b0:930:57e5:d9a8 with SMTP id ju11-20020a17090798ab00b0093057e5d9a8mr2400369ejc.68.1680869192140; Fri, 07 Apr 2023 05:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680869192; cv=none; d=google.com; s=arc-20160816; b=hRhfMVV4F0w/8AYWulHNmRUvaHaT/VoVRDVM66Lx82GPB2QJQ9IdBAZqPEiCkaJu8r GFiK2djq1SC1V7J/M/+fczmvPGXccWK+pB6tZYF05+s3T5R0cnB+duJEl63/HbyzpmnE DPFoA9rNcQRp2Fo/Uh/ji0WCjhfvAAD72YvrgPrPeh3N6EM81IP1v+MCbyOFs9pZYtO4 dnuktr25PKq/uiSREcIk7Ddp7ohbyVFw3p8PeRNRaNxxWoCULqRxnAuWmaHOb/S7X+zM STIq0MpfGRWbzyxU4E5CDYHyFdwwoCO25zMA/fMUCDMZUfA9H3Jj9Gxs8UQ8TLenKYWx HcdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bdsSI2dugb8QtnqVf27M40SpFkEimDgZgBLKngWDXtA=; b=pZdSWIujDdyvCyBynYTXW7jovNze19NKnh6+xd1Bz293ZIAqyJr4EPZxZV3pY0QjN6 uKZJi7ZB+S/5EK5lbIFgRJxVWC09Y/zWpoIqcdoClYZMAVDDSyYUS6WtZ10cG96bN6y4 r9WYMB12jyP7GciUaEOLihMs2yoIhdWB/mTT5UcrbWa9zygyC+4fyVz2bm5D55Gd92DJ 25jAYcXAIbxG9Yc1aWDRDpMxnsJKuZwvbT9ApFfXiU6b9wAWQtiGXjzeXSawMdX8CxtE t1SOCvuMOoPHJpc3I7Fd3P4nq7lwEkR1bI5Zpth2MJQUZHJFT2Ondg+K7UhMd/d18Bln tZlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=eHsgTAiy; 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 mb6-20020a170906eb0600b0093c976e36e7si3258136ejb.774.2023.04.07.05.06.06; Fri, 07 Apr 2023 05:06:32 -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=@brainfault-org.20210112.gappssmtp.com header.s=20210112 header.b=eHsgTAiy; 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 S233637AbjDGLxA (ORCPT + 99 others); Fri, 7 Apr 2023 07:53:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232378AbjDGLw4 (ORCPT ); Fri, 7 Apr 2023 07:52:56 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265867ED5 for ; Fri, 7 Apr 2023 04:52:55 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-4fa81d4f49cso1702797a12.1 for ; Fri, 07 Apr 2023 04:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20210112.gappssmtp.com; s=20210112; t=1680868373; x=1683460373; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bdsSI2dugb8QtnqVf27M40SpFkEimDgZgBLKngWDXtA=; b=eHsgTAiypcrDoToWF8gXeNKhzM4YibV2hdoLrWbc40xstbkqSMD2hqNE1gsmMjN3p4 //6oW8ONGMISP8svpNGmoZx5P1ZtcrmQ3hG8y10TMyWYm8MlUNN2KXBNnRzDADBFNO7W a2GXJ8oaGTYSVlkRyi0UjC1Qg8gOn+ckfYsilet/eHZSkS7NKeeIt+2Xvgmw0N5xDedB Gr2y4Mqzsuc4KnvTWuo00UUGSxbzLNqsqVf2jmQhfsajOKYQqAEoOZ3OZmAat1kYXlBP bl7DwQ+RcnkCoO4WXQmtqho/DofhzTjuFQ3Mj9ggvkXsKoBJyNkhk9I0iXEi/RyiS9Cs MiAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680868373; x=1683460373; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bdsSI2dugb8QtnqVf27M40SpFkEimDgZgBLKngWDXtA=; b=O0MUKJ5Dxc9kCufr4GjNgsPN+J1tbk5Azlu3Xpa/PkNxEALAtgc6MGnJILlcB8dyl7 jAQBJd1orafv/wue3bdoRwHAjO0zucOFHFLWGycr9nlUH+5eF/4nQ3YmtPgsYNNFUD0q Hgh38mlIizHoHwKBjkFB+cCg3TZBjmLSLP+mk/ujjMuPUvJey/UeuNjVPBQbH6VFzPCM JUfUcNGNI9jRxHl+eKQeeBG4by/D+DMLW+KWCM0fPwMPA7/+Qvs/2kBl2SvbaDx41htW Zas8te8OmWnbKwZ29OPqk/jOhofdkmqHROIqy91593Qk2DW7luoYLsClVN/1fb4Acb4n CA1g== X-Gm-Message-State: AAQBX9ekD1xbslvBa+bjkOuK2iAkHBqgkT/f44yTmb9jI+v5Pphv6eZs D89r3+9XM1gui4ygjjxlkB9jLR+sXps2aYUlyzPlbw== X-Received: by 2002:a50:9f43:0:b0:4c0:71e6:9dc5 with SMTP id b61-20020a509f43000000b004c071e69dc5mr766168edf.1.1680868373537; Fri, 07 Apr 2023 04:52:53 -0700 (PDT) MIME-Version: 1.0 References: <20230401112730.2105240-1-apatel@ventanamicro.com> In-Reply-To: <20230401112730.2105240-1-apatel@ventanamicro.com> From: Anup Patel Date: Fri, 7 Apr 2023 17:22:42 +0530 Message-ID: Subject: Re: [PATCH] RISC-V: KVM: Allow Zbb extension for Guest/VM To: Anup Patel Cc: Paolo Bonzini , Atish Patra , Palmer Dabbelt , Paul Walmsley , Andrew Jones , kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 Sat, Apr 1, 2023 at 4:57=E2=80=AFPM Anup Patel = wrote: > > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable Zbb extension for Guest/VM. > > Signed-off-by: Anup Patel Queued this patch for Linux-6.4 Thanks, Anup > --- > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm/vcpu.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/= asm/kvm.h > index d8ead5952ed9..47a7c3958229 100644 > --- a/arch/riscv/include/uapi/asm/kvm.h > +++ b/arch/riscv/include/uapi/asm/kvm.h > @@ -106,6 +106,7 @@ enum KVM_RISCV_ISA_EXT_ID { > KVM_RISCV_ISA_EXT_SVINVAL, > KVM_RISCV_ISA_EXT_ZIHINTPAUSE, > KVM_RISCV_ISA_EXT_ZICBOM, > + KVM_RISCV_ISA_EXT_ZBB, > KVM_RISCV_ISA_EXT_MAX, > }; > > diff --git a/arch/riscv/kvm/vcpu.c b/arch/riscv/kvm/vcpu.c > index 3112697cb12d..02b49cb94561 100644 > --- a/arch/riscv/kvm/vcpu.c > +++ b/arch/riscv/kvm/vcpu.c > @@ -61,6 +61,7 @@ static const unsigned long kvm_isa_ext_arr[] =3D { > KVM_ISA_EXT_ARR(SSTC), > KVM_ISA_EXT_ARR(SVINVAL), > KVM_ISA_EXT_ARR(SVPBMT), > + KVM_ISA_EXT_ARR(ZBB), > KVM_ISA_EXT_ARR(ZIHINTPAUSE), > KVM_ISA_EXT_ARR(ZICBOM), > }; > @@ -99,6 +100,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigne= d long ext) > case KVM_RISCV_ISA_EXT_SSTC: > case KVM_RISCV_ISA_EXT_SVINVAL: > case KVM_RISCV_ISA_EXT_ZIHINTPAUSE: > + case KVM_RISCV_ISA_EXT_ZBB: > return false; > default: > break; > -- > 2.34.1 >