Message ID | 20230919035343.1399389-4-apatel@ventanamicro.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3183146vqi; Tue, 19 Sep 2023 00:03:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHELRR1NJMgJAvf7ND6uVHJZf4Ybj0vp692hIkZsjlSGh+SXNT/VdohPC6sjfPi2j40MfBb X-Received: by 2002:a17:90a:c0f:b0:274:3a86:4c10 with SMTP id 15-20020a17090a0c0f00b002743a864c10mr9468077pjs.29.1695106992525; Tue, 19 Sep 2023 00:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695106992; cv=none; d=google.com; s=arc-20160816; b=ffQ/m6Cm/ed93HVsqmL+O1P0p9N03i1NOiWxHbhDFveJWNbJzLe9x+Y6AFBNU7CvcR /O44Dl1NN+A9cnLvSlWCwRFxtY7NaUvxG+lRbs9ALHECryMDQNZZPIWV8qhYHGY2wOZw Ux6CxFLHypFHHfRyl42Z0ej0EpInN8vrPH/ctUs4BhmtAFK7FoTcaTq8rUkAGXHLWveA PD9MTko/NgybR8IUbslQLZGDfInpQ77OTD3orn6xpXM3SzgXhUu9CuC5mEh8DNahrQ+D xb6eTzG5JABIM3zK3aqpdEOFZxPddSjeQCNGO5m4hfoMaEfaNtMFQzX9ciY+3BwZxHdi iPZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l4XXbW7JTA+rX6h2wllSUbALMsH935/QgdVn7NuGhB8=; fh=Nnw/Dw3prVIT5KLOVQO3DcS15zu3mo0yAEjXPL5Uo9Q=; b=ntK962Pxi6vaAU1R4cOiiJI+MOPv5wxFSbiyEMfAVG24Gy1hoUdBQeMRqTFQFPT9TZ njogeZwt1yaGEUSbwsAQhd3qgir/HIAFZOgPAAyuNKWskBsjPVDHjZqt/v7TIdwH0xKK 95omqvEXYYg+y34ak/K82lGxh8O5dR5E0cQRWrazeftX3uZgvU4nlf3m8ezMzOBQnmFR kE6cQ+Nvm/AARV1q7KaTFxunfcG0ax/rmDb5vcj0nq0NTkPSToHPY/9PUiomNjomwKMu auvl+fDiGBUTByXGhoVyv/UE8410LBle0ORW9xUt12e4xbTr0oQivSNb/PxWmUia27Hi 83TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=SZUfbmyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w5-20020a17090a4f4500b002691e659560si11420883pjl.163.2023.09.19.00.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 00:03:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=SZUfbmyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B2B4F81BAA51; Mon, 18 Sep 2023 20:54:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231390AbjISDy0 (ORCPT <rfc822;toshivichauhan@gmail.com> + 26 others); Mon, 18 Sep 2023 23:54:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231442AbjISDyX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 18 Sep 2023 23:54:23 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1E1F135 for <linux-kernel@vger.kernel.org>; Mon, 18 Sep 2023 20:54:15 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-578afd8b46cso368676a12.0 for <linux-kernel@vger.kernel.org>; Mon, 18 Sep 2023 20:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1695095654; x=1695700454; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=l4XXbW7JTA+rX6h2wllSUbALMsH935/QgdVn7NuGhB8=; b=SZUfbmyXa9kHcmrS6PWs/XaUTkBZbQTOIGPglqhn6Lo2zx9S7C+r2XWrl28jajAjOw bCAdVYfrmchzZ5tL06KzgzlnqLAHmhTkpTj/dMDodFy7RhYv3zb7CP1oR+nG0j8Efyt6 CmXrUBfguYYWDef5x5GkXBYBKCNTfcDcSYoYhSJvlzoeXraxM3/8WH4+q17MkC7vkQmD EjvEmFIYdVWB3m+4uzMcsR6HWHDwsXLret6PBHINAXlCAodkTGoHNcbqTp4GgXZe94r8 MmDyXUbE9W8rp+fX2a9sztrIvh+c62yAXrX1amP6KpnyjuldUWaElR7cFEXcgn35CSHm YOuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695095654; x=1695700454; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=l4XXbW7JTA+rX6h2wllSUbALMsH935/QgdVn7NuGhB8=; b=rS9PuEAuLwxGChYdqx7ZbrO1vlpxU6yeUzTYCNfNkh2yXoioVVIhq/ZhDdGtBomVQk JIOkHZDIMtrdMOjstQq+mwtna5+tRxJeJ51iczk2qCElpxpz8+R98XIqgS9hMy1ldiNb dNjUy8vxEMpxd03ninsWjp6/SFL/fk1CfhrQIGDmMce16MSGpPn2vEPGWbSAhZE2YjK2 dhmVixxJohIEXfdRw30Ln0aWV4sraiXKq9zHbaI50adw1yk6/d5K8zdXLRYyT0Hyc9Xn LoHLcKmXD3O63k1tpGsghGyFIFvACd0TwTb2Jm2CFS4aybRk+/DdxZFB6KTaAOh+O5QT o3kQ== X-Gm-Message-State: AOJu0YxX/y5dwBjfm5a7UEa9Z2Th27uUFRgrdjrz9nT6cWqBjSPlu2E9 AxnKTOF19FXhbupAK/cLR3rEgqUQpHKfifkEScL0xw== X-Received: by 2002:a17:90a:c0f:b0:274:3a86:4c10 with SMTP id 15-20020a17090a0c0f00b002743a864c10mr9217500pjs.29.1695095654352; Mon, 18 Sep 2023 20:54:14 -0700 (PDT) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id 3-20020a17090a034300b00273fc850342sm4000802pjf.20.2023.09.18.20.54.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 20:54:14 -0700 (PDT) From: Anup Patel <apatel@ventanamicro.com> To: Paolo Bonzini <pbonzini@redhat.com>, Atish Patra <atishp@atishpatra.org>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Conor Dooley <conor@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Shuah Khan <shuah@kernel.org> Cc: Andrew Jones <ajones@ventanamicro.com>, Mayuresh Chitale <mchitale@ventanamicro.com>, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Anup Patel <apatel@ventanamicro.com> Subject: [PATCH 3/7] RISC-V: KVM: Allow XVentanaCondOps extension for Guest/VM Date: Tue, 19 Sep 2023 09:23:39 +0530 Message-Id: <20230919035343.1399389-4-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230919035343.1399389-1-apatel@ventanamicro.com> References: <20230919035343.1399389-1-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 18 Sep 2023 20:54:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777448509461581479 X-GMAIL-MSGID: 1777448509461581479 |
Series |
KVM RISC-V Conditional Operations
|
|
Commit Message
Anup Patel
Sept. 19, 2023, 3:53 a.m. UTC
We extend the KVM ISA extension ONE_REG interface to allow KVM
user space to detect and enable XVentanaCondOps extension for
Guest/VM.
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
---
arch/riscv/include/uapi/asm/kvm.h | 1 +
arch/riscv/kvm/vcpu_onereg.c | 2 ++
2 files changed, 3 insertions(+)
Comments
On Tue, Sep 19, 2023 at 09:23:39AM +0530, Anup Patel wrote: > We extend the KVM ISA extension ONE_REG interface to allow KVM > user space to detect and enable XVentanaCondOps extension for > Guest/VM. > > Signed-off-by: Anup Patel <apatel@ventanamicro.com> > --- > arch/riscv/include/uapi/asm/kvm.h | 1 + > arch/riscv/kvm/vcpu_onereg.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 b1baf6f096a3..e030c12c7dfc 100644 > --- a/arch/riscv/include/uapi/asm/kvm.h > +++ b/arch/riscv/include/uapi/asm/kvm.h > @@ -138,6 +138,7 @@ enum KVM_RISCV_ISA_EXT_ID { > KVM_RISCV_ISA_EXT_ZIFENCEI, > KVM_RISCV_ISA_EXT_ZIHPM, > KVM_RISCV_ISA_EXT_SMSTATEEN, > + KVM_RISCV_ISA_EXT_XVENTANACONDOPS, > KVM_RISCV_ISA_EXT_MAX, > }; > > diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c > index 388599fcf684..17a847a1114b 100644 > --- a/arch/riscv/kvm/vcpu_onereg.c > +++ b/arch/riscv/kvm/vcpu_onereg.c > @@ -40,6 +40,7 @@ static const unsigned long kvm_isa_ext_arr[] = { > KVM_ISA_EXT_ARR(SVINVAL), > KVM_ISA_EXT_ARR(SVNAPOT), > KVM_ISA_EXT_ARR(SVPBMT), > + KVM_ISA_EXT_ARR(XVENTANACONDOPS), > KVM_ISA_EXT_ARR(ZBA), > KVM_ISA_EXT_ARR(ZBB), > KVM_ISA_EXT_ARR(ZBS), > @@ -89,6 +90,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext) > case KVM_RISCV_ISA_EXT_SSTC: > case KVM_RISCV_ISA_EXT_SVINVAL: > case KVM_RISCV_ISA_EXT_SVNAPOT: > + case KVM_RISCV_ISA_EXT_XVENTANACONDOPS: > case KVM_RISCV_ISA_EXT_ZBA: > case KVM_RISCV_ISA_EXT_ZBB: > case KVM_RISCV_ISA_EXT_ZBS: > -- > 2.34.1 > Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h index b1baf6f096a3..e030c12c7dfc 100644 --- a/arch/riscv/include/uapi/asm/kvm.h +++ b/arch/riscv/include/uapi/asm/kvm.h @@ -138,6 +138,7 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZIFENCEI, KVM_RISCV_ISA_EXT_ZIHPM, KVM_RISCV_ISA_EXT_SMSTATEEN, + KVM_RISCV_ISA_EXT_XVENTANACONDOPS, KVM_RISCV_ISA_EXT_MAX, }; diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c index 388599fcf684..17a847a1114b 100644 --- a/arch/riscv/kvm/vcpu_onereg.c +++ b/arch/riscv/kvm/vcpu_onereg.c @@ -40,6 +40,7 @@ static const unsigned long kvm_isa_ext_arr[] = { KVM_ISA_EXT_ARR(SVINVAL), KVM_ISA_EXT_ARR(SVNAPOT), KVM_ISA_EXT_ARR(SVPBMT), + KVM_ISA_EXT_ARR(XVENTANACONDOPS), KVM_ISA_EXT_ARR(ZBA), KVM_ISA_EXT_ARR(ZBB), KVM_ISA_EXT_ARR(ZBS), @@ -89,6 +90,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext) case KVM_RISCV_ISA_EXT_SSTC: case KVM_RISCV_ISA_EXT_SVINVAL: case KVM_RISCV_ISA_EXT_SVNAPOT: + case KVM_RISCV_ISA_EXT_XVENTANACONDOPS: case KVM_RISCV_ISA_EXT_ZBA: case KVM_RISCV_ISA_EXT_ZBB: case KVM_RISCV_ISA_EXT_ZBS: