From patchwork Wed Jun 19 15:39:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 1949753 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KvW4WNWu; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=XmXtInNa; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W47Bq2HG8z20XZ for ; Thu, 20 Jun 2024 01:41:23 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jPQmmKKDVJjZADy8TD5oxd3MfCvyXYTxgbiHDwTk7sI=; b=KvW4WNWucyzHiT 6YiDbhJyYPXQbv2dqE57Zv4ujXrUpq6JuDne1Zg43uhBQXAVM/eHxfSv5OZImYLTQ66kNz5ve6qZD K5+PjmNmZ2Ryj4cDSAeip9Cl/LC2U9odn84ixgIgtpRLtEj5x4163QRF2HMLoq/B1bIx9rsA7CIbN jc8dpt2R2m3IfUs+TEoqxnFQRdHwrFAdKWCDpwyXVCPnsG8P1fuFpqqzPltJ3T65G8KWKH50K49VA /tw6vayiPDSZ84snPH/mAC/QjrHW8oN1M78a02HziYHANkliPz4PJHv6XwxkXMtg1yogFgEWNmtDb /5vZSgJNhXmZYx7npFHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxR3-00000001qaP-0SpB; Wed, 19 Jun 2024 15:41:21 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxQu-00000001qTC-4BIC for kvm-riscv@lists.infradead.org; Wed, 19 Jun 2024 15:41:15 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4247adb75a1so232095e9.3 for ; Wed, 19 Jun 2024 08:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718811671; x=1719416471; darn=lists.infradead.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=4SiklklSKLnUGvj1C6ENo1sDkOQpn+QWruzZ6zUta1c=; b=XmXtInNafrU+jwnsJpzJKlce8RvfzMVPIliHeLlFYIvNBEGYSCw1BZtiUMGKQActKs fhsNI1n0KKakm4m3/gemJP2v7nCi59nAPDG0qk5AEk8APVAZTeXOOVvTIwFXAM9xky7K YZw9wwyGXRzqeIt5wNEnf23Qe2AC30Crc86VkvgIkUqRXYMXK79+BXLIxQU/XGREvGIA /7Vn6rlOnOO14JI/Am4UAgQthOknwu8irYp54Q81CVcjDT2u2WZFKLm/+PxLmMp1iPcU JAkcuAcpITNIwJH/3TYS4AZBdS8MsPpRAZOVPHKlWudsVTHPcjHy/CbHTuru41OAUHGU RvNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811671; x=1719416471; 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=4SiklklSKLnUGvj1C6ENo1sDkOQpn+QWruzZ6zUta1c=; b=sWvDqOfYVvYeo+LVcqc9JNgLrbIGciRq3EzvfNrwlpR41u2rclxfeoRHZLYe4sXf4k 2Svu6q1I/rX1OMKxNRgNUFIn39cYp0nnpT01bG87SmHc0pVbbFA2w2jIK8rtex5njGGk 8P/vBMeg0SduZbcA5zyuQpMLPNBolst9Z6wPKtA4guf4N/rfFs/OSXlDXvSD6Mt4Px7M scOeQG7mpSs4xXpP4Z3HZpdmyFq3tnHM0QRf7w+97mDIg0o5lg4mDsE9fDAmWOT/tgWy y0yMwjHHV0IsVA8c6ep+ujSBGmNoInB65v6qCpuq4T+DW4uvun10qayVGrCFEU5a2Hzy N5oQ== X-Forwarded-Encrypted: i=1; AJvYcCX1HFhjEoQg2MjwX5Ts+aUSkhbrerM7lkz1T0QDMSs+74sfuiC/boKM0s6zcodByPODzo8CasnT37D9k1duwi8gKkJUdGbPgtak/EVgFw== X-Gm-Message-State: AOJu0YwOS1GbXJCFbTyy1qN1/mLhUkDZfw2l3rsnfXaHuHYGmEyJp11y lUow+pAhmlfvsKrI6d2r08bVkk1TG/8h++D8oNqQKhflrMam/kEpyrjy/w8DoVg= X-Google-Smtp-Source: AGHT+IFM9BO+cRboDOZItswqfJhKnEJlq+pT+xsqwOnHXCasZo7t145rk+2pPxABjV30c0ZiYjwFGQ== X-Received: by 2002:a05:6000:1787:b0:35f:247e:fbce with SMTP id ffacd0b85a97d-363170ed4c8mr2179347f8f.1.1718811671025; Wed, 19 Jun 2024 08:41:11 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:819d:b9d2:9c2:3b7a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c785sm17392292f8f.34.2024.06.19.08.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:41:10 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan , Atish Patra Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 1/5] dt-bindings: riscv: add Zaamo and Zalrsc ISA extension description Date: Wed, 19 Jun 2024 17:39:08 +0200 Message-ID: <20240619153913.867263-2-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153913.867263-1-cleger@rivosinc.com> References: <20240619153913.867263-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_084113_067190_92F413BB X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__Add_description_for_the_Zaamo_and_Zalr?= =?unknown-8bit?q?sc_ISA_extension=5B1=5D=2E?= =?unknown-8bit?q?_Link=3A_https=3A//github=2Ecom/riscv/riscv-zaamo-zalrsc_?= =?unknown-8bit?q?=5B1=5D_Signed-off-by=3A_Cl=C3=A9ment?= =?unknown-8bit?q?_L=C3=A9ger_=3Ccleger=40rivosinc=2Ecom=3E_---_=2E=2E=2E/dev?= =?unknown-8bit?q?icetree/bindings/riscv/extensions=2Eyaml?= =?unknown-8bit?q?_=7C_19_+++++++++++++++++++_1_file_changed=2C_19_=5B=2E=2E?= =?unknown-8bit?q?=2E=5D_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-0=2E0_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C_no?= =?unknown-8bit?q?_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDozMmEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E0_T=5FSCC=5FBODY=5FTEXT=5FLINE___No_description_avail?= =?unknown-8bit?q?able=2E?= X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add description for the Zaamo and Zalrsc ISA extension[1]. Link: https://github.com/riscv/riscv-zaamo-zalrsc [1] Signed-off-by: Clément Léger Acked-by: Conor Dooley --- .../devicetree/bindings/riscv/extensions.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml index 33f1a86efed8..982684e4daa1 100644 --- a/Documentation/devicetree/bindings/riscv/extensions.yaml +++ b/Documentation/devicetree/bindings/riscv/extensions.yaml @@ -171,12 +171,24 @@ properties: memory types as ratified in the 20191213 version of the privileged ISA specification. + - const: zaamo + description: | + The standard Zaamo extension for atomic memory operations as + ratified at commit e87412e621f1 ("integrate Zaamo and Zalrsc text + (#1304)") of the unprivileged ISA specification. + - const: zacas description: | The Zacas extension for Atomic Compare-and-Swap (CAS) instructions is supported as ratified at commit 5059e0ca641c ("update to ratified") of the riscv-zacas. + - const: zalrsc + description: | + The standard Zalrsc extension for load-reserved/store-conditional as + ratified at commit e87412e621f1 ("integrate Zaamo and Zalrsc text + (#1304)") of the unprivileged ISA specification. + - const: zba description: | The standard Zba bit-manipulation extension for address generation @@ -591,6 +603,13 @@ properties: then: contains: const: zca + # Zacas depends on Zaamo + - if: + contains: + const: zacas + then: + contains: + const: zaamo allOf: # Zcf extension does not exist on rv64 From patchwork Wed Jun 19 15:39:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 1949754 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=wUaelCcT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=XujtEj0V; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W47Br1R5sz20XQ for ; Thu, 20 Jun 2024 01:41:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fc13Qz8BABRrZAPxC/XaDDxvOUV6MLXs96B+dAEPJBk=; b=wUaelCcTXK8lN7 0J9T8/kl7blGzha4/hm+jjM/uSqYt6+Jczkj0IgUDXzad3q1+r2CP/n/1bIEX42EgS46kTqQunXY2 c37E3FwCEi6yttpL34uw4VFdKdy3i1oAhRxU6Z1B8WCWrCwUBg+Ofy+f9TJAMo/m8SA51pUxHcRK/ s1dw9xBdPUSACfSHRuPGd4+KF9BLTACzcbAPKbtIm0nxaUTY08UrLvdBhqhvkrh0Trkq7mdRpEUYW 8F8c/Q3YsAr3VZus8Mo4J/jnUdyBie7Df67Exge28r7gIbwpsQzTM1mNwpYYmCfkvNaNCHmVu2pHn IxzdKdGM83obSJcum/7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxR4-00000001qbP-28mP; Wed, 19 Jun 2024 15:41:22 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxQw-00000001qUY-2jWU for kvm-riscv@lists.infradead.org; Wed, 19 Jun 2024 15:41:17 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3635f991f4bso70888f8f.0 for ; Wed, 19 Jun 2024 08:41:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718811673; x=1719416473; darn=lists.infradead.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=XxBaoVReHjYi8LCIKzJk71raI5rhLtFKE/0A3hAurqc=; b=XujtEj0Vqty134XKkkMujJTmdwC3WwmBuw0rzi31szqLHCJtWbSCL4nYThfpFUpHag 1l9NzWJ8I5UxaB5zoHzH069GjSdQCjpNKJApQhE2zkzFPnNztFaEVZDaZTKyf30kUd5a GORTEnKxUT+TpLnKKXH1jfEcB+SorSTIUrA8NSULb5w2GPaNS5KudlegppzFXgj3fxDW 7tzkeFfUpYd2yjrZAdTDQUiLHkuMkaha//2uOb/dzGlhS5LCUnthDMtXlo9vh3T2KN9f SKE/yay9XcPENcv5EPA5D76x7Rit0c4dcRJ/wE74LgngHcvt9xUsvHQNVQwhC7dOPwPE qaKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811673; x=1719416473; 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=XxBaoVReHjYi8LCIKzJk71raI5rhLtFKE/0A3hAurqc=; b=YMgyjxKRa681I9X1wd8zQQSdIUVZd21oA5JCli3H4oAdeVUG2iIlAHRLVzIUVZCSIl HRNan06NgaOXM65uKNGGcwe0Dj0i0yOi/c92wJCz6ZYG14pyedeiubMtgzauD/vIqdad Xtc5Xt/csIQMPlS2V3immX7H5gVz6juNg16f5EiRDMYVNLom2/Vks1YQUzbh3Hf1ed3L MmdbrlgmHfG0F6hrcbY2ug5/HfkX39zsNfZhbskY2+6OX/0cVFkSuHQSuwuHcXLfT2ZJ CgoOVYs4+g5OTzPI4RPqm0PWPjPYiTh3yiQbPFDOg9oKFPSluql3TgdrWWMX0SmAWmh2 Njaw== X-Forwarded-Encrypted: i=1; AJvYcCXljn8xE1oXiOigDk8ycmZnf1oadV7ZxnrNiz0NQhSIwO8BiJxjEhwWKKLXsbVehTqVOhEoSCQEXI8Q0383PevIBalygJx36KS0eaqAMQ== X-Gm-Message-State: AOJu0YzQIdInknMve1vQ5j88wKDAJuyDtq9AixRzrNebdoNrj4GRfr/1 CWJ9WcAx9uJqlEcSJJMmMYVE1JIQkl5A/x3eUWqxAaKb0bo222yxrLfZAgH3e3M= X-Google-Smtp-Source: AGHT+IFz7mNhNVrkeHHVYr8mBns/F7ItFsjrGXd+9ip+r+Vpj1iuLdfUz+P+4a8dyx9jXLcARTyeFg== X-Received: by 2002:adf:cf02:0:b0:364:7a63:93c7 with SMTP id ffacd0b85a97d-3647a639555mr16771f8f.1.1718811672887; Wed, 19 Jun 2024 08:41:12 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:819d:b9d2:9c2:3b7a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c785sm17392292f8f.34.2024.06.19.08.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:41:11 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan , Atish Patra Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 2/5] riscv: add parsing for Zaamo and Zalrsc extensions Date: Wed, 19 Jun 2024 17:39:09 +0200 Message-ID: <20240619153913.867263-3-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153913.867263-1-cleger@rivosinc.com> References: <20240619153913.867263-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_084115_239655_793FD760 X-CRM114-Status: GOOD ( 12.29 ) X-Spam-Score: -0.0 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__These_2_new_extensions_are_actually_a_?= =?unknown-8bit?q?subset_of_the_A_extension?= =?unknown-8bit?q?_which_provides_atomic_memory_operations_and_load-reserved/?= =?unknown-8bit?q?store-conditional?= =?unknown-8bit?q?_instructions=2E_Signed-off-by=3A_Cl=C3=A9ment_L=C3=A9ger_?= =?unknown-8bit?q?=3Ccleger=40rivosinc=2Ecom=3E_---_arch/riscv/include/asm/h?= =?unknown-8bit?q?wcap=2Eh?= =?unknown-8bit?q?_=7C_2_++_arch/riscv/kernel/cpufeature=2Ec_=7C_9_++++++++-_?= =?unknown-8bit?q?2_files_changed=2C_10_insertions=28+=29=2C?= =?unknown-8bit?q?_1_deletion=28-=29_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-0=2E0_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C_no?= =?unknown-8bit?q?_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDo0MzIgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E0_T=5FSCC=5FBODY=5FTEXT=5FLINE___No_description_avail?= =?unknown-8bit?q?able=2E?= X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org These 2 new extensions are actually a subset of the A extension which provides atomic memory operations and load-reserved/store-conditional instructions. Signed-off-by: Clément Léger Acked-by: Conor Dooley --- arch/riscv/include/asm/hwcap.h | 2 ++ arch/riscv/kernel/cpufeature.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h index 4880324a1b29..69be244bce4b 100644 --- a/arch/riscv/include/asm/hwcap.h +++ b/arch/riscv/include/asm/hwcap.h @@ -92,6 +92,8 @@ #define RISCV_ISA_EXT_ZCD 83 #define RISCV_ISA_EXT_ZCF 84 #define RISCV_ISA_EXT_ZCMOP 85 +#define RISCV_ISA_EXT_ZAAMO 86 +#define RISCV_ISA_EXT_ZALRSC 87 #define RISCV_ISA_EXT_XLINUXENVCFG 127 diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index ec4bff7a827c..d71e5bd58acc 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -156,6 +156,11 @@ static int riscv_ext_zcf_validate(const struct riscv_isa_ext_data *data, return -EPROBE_DEFER; } +static const unsigned int riscv_a_exts[] = { + RISCV_ISA_EXT_ZAAMO, + RISCV_ISA_EXT_ZALRSC, +}; + static const unsigned int riscv_zk_bundled_exts[] = { RISCV_ISA_EXT_ZBKB, RISCV_ISA_EXT_ZBKC, @@ -327,7 +332,7 @@ static const unsigned int riscv_c_exts[] = { const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(i, RISCV_ISA_EXT_i), __RISCV_ISA_EXT_DATA(m, RISCV_ISA_EXT_m), - __RISCV_ISA_EXT_DATA(a, RISCV_ISA_EXT_a), + __RISCV_ISA_EXT_SUPERSET(a, RISCV_ISA_EXT_a, riscv_a_exts), __RISCV_ISA_EXT_DATA(f, RISCV_ISA_EXT_f), __RISCV_ISA_EXT_DATA(d, RISCV_ISA_EXT_d), __RISCV_ISA_EXT_DATA(q, RISCV_ISA_EXT_q), @@ -346,7 +351,9 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = { __RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE), __RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM), __RISCV_ISA_EXT_DATA(zimop, RISCV_ISA_EXT_ZIMOP), + __RISCV_ISA_EXT_DATA(zaamo, RISCV_ISA_EXT_ZAAMO), __RISCV_ISA_EXT_DATA(zacas, RISCV_ISA_EXT_ZACAS), + __RISCV_ISA_EXT_DATA(zalrsc, RISCV_ISA_EXT_ZALRSC), __RISCV_ISA_EXT_DATA(zfa, RISCV_ISA_EXT_ZFA), __RISCV_ISA_EXT_DATA(zfh, RISCV_ISA_EXT_ZFH), __RISCV_ISA_EXT_DATA(zfhmin, RISCV_ISA_EXT_ZFHMIN), From patchwork Wed Jun 19 15:39:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 1949755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=N8hn2xDA; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=MGy0S+zw; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W47Bw52tSz20XQ for ; Thu, 20 Jun 2024 01:41:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NkGqIbzSxlRsXtGU+rG3cL2ugcdBmbNrsJsyr/slv+0=; b=N8hn2xDAG74GMe UOiuNyVcxCA2k0B3U8mStxDpGjqDCX1qTLxZ8XrAEDuE5pPZvTpPF7hj4ZOZhQcHuozD2k58Exw7j htd/eznLdEFIObw7S7yNjj8oP0FZ8o1SqskjVwF2ZtfYR+jOV/3hExMBgNzuJ5O0gWPlon6pkmfso dL6CTQJ1E8MWPqlheiLvWz8AuUPusLFXrV2p5WRvSQSQXR0OFCtuxnhKk9kliadYQ5A7IUaLzqcRF I1d9svPz1wVgkr5Zf1Zr4lHpqLl160/+09xi6M8Um5GrXmccPaJ0qy12S6saCA4jP07g2zKErOiDM yyO/KQCA99MYLWwDyJlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxR9-00000001qdv-1MTS; Wed, 19 Jun 2024 15:41:27 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxQx-00000001qVC-2YPF for kvm-riscv@lists.infradead.org; Wed, 19 Jun 2024 15:41:17 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42111cf1ca1so4896405e9.3 for ; Wed, 19 Jun 2024 08:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718811674; x=1719416474; darn=lists.infradead.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=GPY+3E4dBoFlMa6qj3x8QVsLE7eX+roIHLt6ynEnu2U=; b=MGy0S+zwTDbP01RGavRb3eKm9pY1ZxLLcaUmkCAPXqAtXes64jZBVjR5p/v0USNRJs nXD4R6TAr8OHssMLBtmeMW7ARQFlAl1k6jq3MKPfEulXa568o0iFBq1ttCueCBSI+FPH B9hS32KgoXSAbPh6fhMqAoDIej204tMe+tMjyWYNni0LMq94G3SNWpU+6xuihgyryGxy CIIzrN9pbfdZPhqNCDgel5fFFXxYicL/hkxhAzFVBk6M9QchE3So3UxURmtLtYYtB+Hx DsrwPAnBsF73rCdCtMdadR/a3qcQoEAXsk5KI7HrX2ikCKGQj1DcOU4nndjDrpW4667K 7Y9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811674; x=1719416474; 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=GPY+3E4dBoFlMa6qj3x8QVsLE7eX+roIHLt6ynEnu2U=; b=rICnGASDV3B52ScMiHa6L8bC/AFL7ch1OiE7MS6NaFQh/E7mDnWnT9Wadb0AJeh2Jn myrt97l9z2FmBNe5YEfgVTacmCPYUDd/D/tgs4yfTPFJSyuT4/pJfhJ9EvFDFrbpI4ij 6/t7z5/7I8AMIvPe0EYOzeZcB0xnmyRtacMDprVNxV2R4zUc7DJ1Oe2chAk1ty6+2F/s M+G7mXOa26NHDnL8ARjM8zDi+oNciYsosA294CTZKXvNw+iF1Y/LYDhBjlREhKvWI3sE y8mT6YvcXUBor+EyYAt5oKXiZdGvcnJkF7hWrr/Y7zWvC5lvQqajSvG88SCKDPiPqD+t eZBw== X-Forwarded-Encrypted: i=1; AJvYcCUcO+HtsdTWN7hpHhxCMbtI5zrDzvJvOAaBhaV+9DKZvaoT3eYpA2wmhlRvZogs3V0P81pY+OF+F1szHoOND7qYPQjQK7efgi3NTsZW4g== X-Gm-Message-State: AOJu0YzggrJXHIGxJY/ujYEkpEHKeMMPsjwP+eZhqhDeZuiT2rO8bxpf nNKm0hQmUIuJp2PUWt11/3mln9u8N/X6T26zHGSi7+lDFOjZWWQSSUfw2p6ZhC8= X-Google-Smtp-Source: AGHT+IHEyMK/ITgXlMXOhDLGJETYUb24IsTevTAqgLrmuWFBKFkU3n8nX5A972+nIAwKJBmfBumqAA== X-Received: by 2002:a5d:5f93:0:b0:35f:2929:846e with SMTP id ffacd0b85a97d-363171e28demr2732165f8f.1.1718811673916; Wed, 19 Jun 2024 08:41:13 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:819d:b9d2:9c2:3b7a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c785sm17392292f8f.34.2024.06.19.08.41.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:41:13 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan , Atish Patra Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 3/5] riscv: hwprobe: export Zaamo and Zalrsc extensions Date: Wed, 19 Jun 2024 17:39:10 +0200 Message-ID: <20240619153913.867263-4-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153913.867263-1-cleger@rivosinc.com> References: <20240619153913.867263-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_084115_843627_12D1D9D2 X-CRM114-Status: GOOD ( 11.31 ) X-Spam-Score: -0.0 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__Export_the_Zaamo_and_Zalrsc_extensions?= =?unknown-8bit?q?_to_userspace_using?= =?unknown-8bit?q?_hwprobe=2E_Signed-off-by=3A_Cl=C3=A9ment_L=C3=A9ger_=3Ccle?= =?unknown-8bit?q?ger=40rivosinc=2Ecom=3E_---_Documentation/arch/riscv/hwpro?= =?unknown-8bit?q?be=2Erst?= =?unknown-8bit?q?_=7C_8_++++++++_arch/riscv/include/uapi/asm/hwprobe=2Eh_=7C?= =?unknown-8bit?q?_2_++_arch/riscv/kernel/sys=5Fhwprobe=2Ec?= =?unknown-8bit?b?IHwgMiArKyAzIGZpbGVzIGMgWy4uLl0g?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-0=2E0_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C_no?= =?unknown-8bit?q?_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDozMzMgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E0_T=5FSCC=5FBODY=5FTEXT=5FLINE___No_description_avail?= =?unknown-8bit?q?able=2E?= X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Export the Zaamo and Zalrsc extensions to userspace using hwprobe. Signed-off-by: Clément Léger Reviewed-by: Charlie Jenkins --- Documentation/arch/riscv/hwprobe.rst | 8 ++++++++ arch/riscv/include/uapi/asm/hwprobe.h | 2 ++ arch/riscv/kernel/sys_hwprobe.c | 2 ++ 3 files changed, 12 insertions(+) diff --git a/Documentation/arch/riscv/hwprobe.rst b/Documentation/arch/riscv/hwprobe.rst index 25d783be2878..6836a789a9b1 100644 --- a/Documentation/arch/riscv/hwprobe.rst +++ b/Documentation/arch/riscv/hwprobe.rst @@ -235,6 +235,14 @@ The following keys are defined: supported as defined in the RISC-V ISA manual starting from commit c732a4f39a4 ("Zcmop is ratified/1.0"). + * :c:macro:`RISCV_HWPROBE_EXT_ZAAMO`: The Zaamo extension is supported as + defined in the in the RISC-V ISA manual starting from commit e87412e621f1 + ("integrate Zaamo and Zalrsc text (#1304)"). + + * :c:macro:`RISCV_HWPROBE_EXT_ZALRSC`: The Zalrsc extension is supported as + defined in the in the RISC-V ISA manual starting from commit e87412e621f1 + ("integrate Zaamo and Zalrsc text (#1304)"). + * :c:macro:`RISCV_HWPROBE_KEY_CPUPERF_0`: A bitmask that contains performance information about the selected set of processors. diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h index 920fc6a586c9..52cd161e9a94 100644 --- a/arch/riscv/include/uapi/asm/hwprobe.h +++ b/arch/riscv/include/uapi/asm/hwprobe.h @@ -71,6 +71,8 @@ struct riscv_hwprobe { #define RISCV_HWPROBE_EXT_ZCD (1ULL << 45) #define RISCV_HWPROBE_EXT_ZCF (1ULL << 46) #define RISCV_HWPROBE_EXT_ZCMOP (1ULL << 47) +#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 48) +#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 49) #define RISCV_HWPROBE_KEY_CPUPERF_0 5 #define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0) #define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0) diff --git a/arch/riscv/kernel/sys_hwprobe.c b/arch/riscv/kernel/sys_hwprobe.c index 3d1aa13a0bb2..e09f1bc3af17 100644 --- a/arch/riscv/kernel/sys_hwprobe.c +++ b/arch/riscv/kernel/sys_hwprobe.c @@ -116,6 +116,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair, EXT_KEY(ZCA); EXT_KEY(ZCB); EXT_KEY(ZCMOP); + EXT_KEY(ZAAMO); + EXT_KEY(ZALRSC); /* * All the following extensions must depend on the kernel From patchwork Wed Jun 19 15:39:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 1949756 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=NaM09aNg; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=hB3HlfdK; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W47C26lccz20XQ for ; Thu, 20 Jun 2024 01:41:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dsCXfMahWfbAO2cnzyld++vqiZlkC6iJ/vkPvHKjYJ0=; b=NaM09aNgkXlVb+ ATj88klB5gAjMyiCweuDf6wyQRBt6VbE4e2WYZYxgLtrRxzyLxgyuTzbDrQRwVISXRPHUUzKDekQ9 aS0qpTCu2gbkD/m3rXmtbJKOk+TqDOmbXnRu4qDnoQ14K5szT7o9NRJS3Mld2L6WxF1x4pfVxtibf iu925FnNyjV8jCxE5CRZ156vFU50T+1G1plvMgb5vRQvCLN+KDf7lIwIxLnZ2KOUblA+6USkP4hGA TT0V4EO4nmRCiuvf1NV3a0uqak9jXXNpNZhijjw4XeFTh/4h8jbhE3SpSfc9MaE2kVZdKSsWM6rrs k8+a184w6OufezLkowQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxRF-00000001qi8-05jX; Wed, 19 Jun 2024 15:41:33 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxQy-00000001qVn-3nC4 for kvm-riscv@lists.infradead.org; Wed, 19 Jun 2024 15:41:18 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42111cf1ca1so4896445e9.3 for ; Wed, 19 Jun 2024 08:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718811675; x=1719416475; darn=lists.infradead.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=6obIhMCgJtCMV7DNAB1Eq7WrI+7/yuJDuJixMHQfyjs=; b=hB3HlfdKP5AGq4YqeEuX4ar/NT+NwmQ3XNmeogKzvCs8jBl5nPrbWYePk8PLmRbJS3 0VzF/0NGVB+QhXF66gxcznoeLxUMuq/r5a0NMIXHtj8cMS11cir8M4pdD59nqOcqbptW kyMSz7+JG9S2oIAkclXvD4yMv2U6FR4fN3gFHW0+BB43Qa+dvq7L0ZjRLZ74VOnB3fAC GBsEwMWTrDW3OZV6w457nWinlxsfFZKbBLfy07XUpX/swhdjK09genoudqJ3SaOnbXeI TLOJKxzBGRJu+K1N/zG3Dh+sHhVFLDB85pkQiF1zTSn52KZp6syzQTneCTPeZ00irkDr cPlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811675; x=1719416475; 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=6obIhMCgJtCMV7DNAB1Eq7WrI+7/yuJDuJixMHQfyjs=; b=kXt8L7dDKAnNmFvBnhvH6sbHNmtNovpQObOh9UvZhbvHwa6/XIO3LSveoFQ3u/f3Mu aGMSeSaBrLTuUIznxk5+pGRS6TCYGS3wRXN44FyOAyQ+vxJP2XgZzIfeFLelEyuKN67G CSAwH2g4Nx7Y9DE3iUvwn+At47TGtwTLKIfJj85bvw8lh7kFhbZrxRed8DFI2L8cwVyB OIL4Mua/Z3GyjaeNdnmcQ5TDf+7SD2cSmTPYoCxcW+a0x3tSLDr59bWUSyEP+6bAHagt tlDjVkMuLlcsTGlBc//W3QtJ82wWkjhkMewyGpIn91j2n1ev8/eWnWJqE1+DcOtN/V4H r0VQ== X-Forwarded-Encrypted: i=1; AJvYcCXYtIdDsPvgf6fSwHJkfZsazjsTRuN+9FVyAPVCrceFbLjTpHM9M//M4rszxefjCI5J+ZJ0KWyylFVEqN5ETjUZU42N4/oI1WIkytspfQ== X-Gm-Message-State: AOJu0YxEeApmhoxngXUFR8C4YgJtDHG54iHMXAWR0vDAVfAoip2pjoPk eaJxkcb4F9hIQHsnmtDM1AXJ8xuiHQpF8hmNCTiLyw4R7aJPCGO1m56ttmuiSo4= X-Google-Smtp-Source: AGHT+IEsiGCR06DYSznwuNGZ/RtWasKc+Sn+mfD0wbhYFJwAh2e2fAjrUA7ukaEqVJFeFkb/5sRZzQ== X-Received: by 2002:a05:6000:18a2:b0:360:872b:7e03 with SMTP id ffacd0b85a97d-36313fd733dmr2801721f8f.0.1718811674851; Wed, 19 Jun 2024 08:41:14 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:819d:b9d2:9c2:3b7a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c785sm17392292f8f.34.2024.06.19.08.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:41:14 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan , Atish Patra Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 4/5] RISC-V: KVM: Allow Zaamo/Zalrsc extensions for Guest/VM Date: Wed, 19 Jun 2024 17:39:11 +0200 Message-ID: <20240619153913.867263-5-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153913.867263-1-cleger@rivosinc.com> References: <20240619153913.867263-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_084117_016619_CE7BCC68 X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__Extend_the_KVM_ISA_extension_ONE=5FREG?= =?unknown-8bit?q?_interface_to_allow_KVM?= =?unknown-8bit?q?_user_space_to_detect_and_enable_Zaamo/Zalrsc_extensions_fo?= =?unknown-8bit?q?r_Guest/VM=2E_Signed-off-by=3A?= =?unknown-8bit?q?_Cl=C3=A9ment_L=C3=A9ger_=3Ccleger=40rivosinc=2Ecom=3E_---_?= =?unknown-8bit?q?arch/riscv/include/uapi/asm/kvm=2Eh?= =?unknown-8bit?q?_=7C_2_++_arch/riscv/kvm/vcpu=5Fonereg=2Ec_=7C_4_++++_2_fil?= =?unknown-8bit?q?es_changed=2C_6_insertions=28+=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-0=2E0_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C_no?= =?unknown-8bit?q?_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDozMzUgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E0_T=5FSCC=5FBODY=5FTEXT=5FLINE___No_description_avail?= =?unknown-8bit?q?able=2E?= X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zaamo/Zalrsc extensions for Guest/VM. Signed-off-by: Clément Léger --- arch/riscv/include/uapi/asm/kvm.h | 2 ++ arch/riscv/kvm/vcpu_onereg.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h index a6215634df7c..f10c6e133d4d 100644 --- a/arch/riscv/include/uapi/asm/kvm.h +++ b/arch/riscv/include/uapi/asm/kvm.h @@ -174,6 +174,8 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZCD, KVM_RISCV_ISA_EXT_ZCF, KVM_RISCV_ISA_EXT_ZCMOP, + KVM_RISCV_ISA_EXT_ZAAMO, + KVM_RISCV_ISA_EXT_ZALRSC, KVM_RISCV_ISA_EXT_MAX, }; diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c index fa5ee544bc69..0972a997beca 100644 --- a/arch/riscv/kvm/vcpu_onereg.c +++ b/arch/riscv/kvm/vcpu_onereg.c @@ -41,7 +41,9 @@ 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(ZAAMO), KVM_ISA_EXT_ARR(ZACAS), + KVM_ISA_EXT_ARR(ZALRSC), KVM_ISA_EXT_ARR(ZBA), KVM_ISA_EXT_ARR(ZBB), KVM_ISA_EXT_ARR(ZBC), @@ -131,7 +133,9 @@ 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_ZAAMO: case KVM_RISCV_ISA_EXT_ZACAS: + case KVM_RISCV_ISA_EXT_ZALRSC: case KVM_RISCV_ISA_EXT_ZBA: case KVM_RISCV_ISA_EXT_ZBB: case KVM_RISCV_ISA_EXT_ZBC: From patchwork Wed Jun 19 15:39:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= X-Patchwork-Id: 1949757 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=GiXySLje; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=RGE9CB2E; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W47C424jJz20XQ for ; Thu, 20 Jun 2024 01:41:36 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8xeNGIeK+08jfS3t0ghEY0hTe5c1RcOhY9A2MM0QBtE=; b=GiXySLjez154Mx Qvi0CKDwcvCKBi0Mx/pPXOLO+gGbfuuB6F3kt1wI+UXMFzPnKeIu908RUvF5LYXZjfjyQAWoG0IrQ /e4TpycWuS3CBgYnf069uGsZ7wV1q5hFYJBm6zZSDhYFM/aVbRwVOvegS0mGrXWAAZk63WMLTVVB5 6OWKgPDFF3kZUUq0XBluC+sB1umPDBjXkDyLwxx30SQ+u9liJNPg4ME3GzsSeUuurQL9pCrXFJEn4 HFqnMhTF3O3uaS7UruegzL236b7zsGvvZOCZ4XwFp53mwYFqPALUduQM5jskvYn2sLuGfIeqlqPXA OZexUu4GpDt7Q/D/KpYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxRF-00000001qic-2BhF; Wed, 19 Jun 2024 15:41:33 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJxR0-00000001qWv-18I2 for kvm-riscv@lists.infradead.org; Wed, 19 Jun 2024 15:41:19 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42181803bf2so4909295e9.1 for ; Wed, 19 Jun 2024 08:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1718811676; x=1719416476; darn=lists.infradead.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=uhmrjq4H2Oq8xJPevOPzXZFQ+Nl3u1sJLUiSeD49DFE=; b=RGE9CB2EQzeCSocRK1YporQkp08YmIMYUU4SYQEHPSagkPYC3iTPw4z/DV21HEXBmM 5k5FD7OK9734pO6YmcdJaakKeCK8oVxWV45xs3FQVkLs6+dKmwBuJp2z9KNSu6bSj2uK CgqKiWs9fRjYjYCl6h1A4nVhE7Gm4pSj8r1N4/ApxP2SOJW7mnqGaVLw7Vtx8WXDLRPF oFOguyJ5fmQD8CnJhjHFK+iES8t5ZiOjDuKL/P6oMCQLA1jzGSClygTmsGwqRXTILo83 r4dF16DdcmQFDnVTfvz8S6yRQY8MrhEXrPDL/WOxk9aQTRLgtpAOg/WIyiEibXn1fXym lB9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811676; x=1719416476; 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=uhmrjq4H2Oq8xJPevOPzXZFQ+Nl3u1sJLUiSeD49DFE=; b=GcEH+7rK2jnI/ZNRmLP1QKCbTwo694wvON88eIQ8OVdnUsOrT3lpVnkwwnkuJRRTSW yzEKqrPnTfWjP4wU9se2lAeORRObKOho3j582VgaE50Uw6yfn3U3SdcCEN3QpE/9tTDT bqsFAiGeEXtECpemdPoqt7gd8ajc92YtpFk7iuSiWrycoVgfcH/Wefxte59ir9mnvmnb 3OYChoNa3VtNpNVIex04LF/2alI82JG/mBaCnjadDMlH7rNwrA1CPB2vY4pQNiIOBnjR XZxHRDC8YIdkwSba5nmSdMOlOolZtC9dYYKvw2FEJRa4x+8E4w7AnolKGVNkIBaQ7pqq OZcQ== X-Forwarded-Encrypted: i=1; AJvYcCVSpB4sApBr87dWm8aZiq24VHkn5zY4VwcsDVywMVZq8llXY20eW+V1ayh0W2b0PJ1PeVy0em4DNXv319gsOhf+ERdNqeFL4GtBFk3OBw== X-Gm-Message-State: AOJu0YyRmb+MVorop8P0Dx17bV5N1ivJ3KIoUSIIBKinTbd6dLWyMX5X s601qc1sHd3SbYefP8tjYU5aEw0Hqus+qd0JJRpbGKdBbX9eE7E1TC4Q+rpfyPI= X-Google-Smtp-Source: AGHT+IGjwtUZf3kMWB9g1O1qJeQzBRQZ0qEbWnfWNveuCVuurscQ/RMRjo/RFMkwbrEud2Tb1Hd71w== X-Received: by 2002:a05:600c:1d09:b0:422:2f06:92d1 with SMTP id 5b1f17b1804b1-42475296800mr18928745e9.2.1718811675796; Wed, 19 Jun 2024 08:41:15 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:819d:b9d2:9c2:3b7a]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c785sm17392292f8f.34.2024.06.19.08.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:41:15 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Anup Patel , Shuah Khan , Atish Patra Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH 5/5] KVM: riscv: selftests: Add Zaamo/Zalrsc extensions to get-reg-list test Date: Wed, 19 Jun 2024 17:39:12 +0200 Message-ID: <20240619153913.867263-6-cleger@rivosinc.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240619153913.867263-1-cleger@rivosinc.com> References: <20240619153913.867263-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_084118_338972_A0B0DEA1 X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.8 (/) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22bombadil=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__The_KVM_RISC-V_allows_Zaamo/Zalrsc_ext?= =?unknown-8bit?q?ensions_for_Guest/VM?= =?unknown-8bit?q?_so_add_these_extensions_to_get-reg-list_test=2E_Signed-off?= =?unknown-8bit?q?-by=3A_Cl=C3=A9ment_L=C3=A9ger?= =?unknown-8bit?q?_=3Ccleger=40rivosinc=2Ecom=3E_---_tools/testing/selftests/?= =?unknown-8bit?q?kvm/riscv/get-reg-list=2Ec?= =?unknown-8bit?q?_=7C_8_++++++++_1_file_changed=2C_8_insertions=28+=29_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=280=2E8_points=2C_5=2E0_req?= =?unknown-8bit?q?uired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C_no?= =?unknown-8bit?q?_trust?= =?unknown-8bit?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDozMmYgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publ?= =?unknown-8bit?q?ish_an_SPF_Record?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily_valid?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_0=2E8_UPPERCASE=5F50=5F75________message_body_is_50-75=25_?= =?unknown-8bit?q?uppercase?= =?unknown-8bit?q?_-0=2E0_T=5FSCC=5FBODY=5FTEXT=5FLINE___No_description_avail?= =?unknown-8bit?q?able=2E?= X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The KVM RISC-V allows Zaamo/Zalrsc extensions for Guest/VM so add these extensions to get-reg-list test. Signed-off-by: Clément Léger --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/kvm/riscv/get-reg-list.c b/tools/testing/selftests/kvm/riscv/get-reg-list.c index 1a5637a6ea1e..70216a1760c3 100644 --- a/tools/testing/selftests/kvm/riscv/get-reg-list.c +++ b/tools/testing/selftests/kvm/riscv/get-reg-list.c @@ -48,7 +48,9 @@ bool filter_reg(__u64 reg) case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVINVAL: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVNAPOT: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_SVPBMT: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZAAMO: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZACAS: + case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZALRSC: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBA: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBB: case KVM_REG_RISCV_ISA_EXT | KVM_REG_RISCV_ISA_SINGLE | KVM_RISCV_ISA_EXT_ZBC: @@ -420,7 +422,9 @@ static const char *isa_ext_single_id_to_str(__u64 reg_off) KVM_ISA_EXT_ARR(SVINVAL), KVM_ISA_EXT_ARR(SVNAPOT), KVM_ISA_EXT_ARR(SVPBMT), + KVM_ISA_EXT_ARR(ZAAMO), KVM_ISA_EXT_ARR(ZACAS), + KVM_ISA_EXT_ARR(ZALRSC), KVM_ISA_EXT_ARR(ZBA), KVM_ISA_EXT_ARR(ZBB), KVM_ISA_EXT_ARR(ZBC), @@ -950,7 +954,9 @@ KVM_ISA_EXT_SIMPLE_CONFIG(sstc, SSTC); KVM_ISA_EXT_SIMPLE_CONFIG(svinval, SVINVAL); KVM_ISA_EXT_SIMPLE_CONFIG(svnapot, SVNAPOT); KVM_ISA_EXT_SIMPLE_CONFIG(svpbmt, SVPBMT); +KVM_ISA_EXT_SIMPLE_CONFIG(zaamo, ZAAMO); KVM_ISA_EXT_SIMPLE_CONFIG(zacas, ZACAS); +KVM_ISA_EXT_SIMPLE_CONFIG(zalrsc, ZALRSC); KVM_ISA_EXT_SIMPLE_CONFIG(zba, ZBA); KVM_ISA_EXT_SIMPLE_CONFIG(zbb, ZBB); KVM_ISA_EXT_SIMPLE_CONFIG(zbc, ZBC); @@ -1012,7 +1018,9 @@ struct vcpu_reg_list *vcpu_configs[] = { &config_svinval, &config_svnapot, &config_svpbmt, + &config_zaamo, &config_zacas, + &config_zalrsc, &config_zba, &config_zbb, &config_zbc,