Message ID | 20240517145302.971019-16-cleger@rivosinc.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> 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=LxaGmD5j; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=PY/9f4+C; 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=anu3PWqU; 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 4VgqkQ2B3Bz20dg for <incoming@patchwork.ozlabs.org>; Sat, 18 May 2024 00:54:54 +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=DEmGqHW2EeNEzrxkRQgik1zvoL1205bvi3twcEaf330=; b=LxaGmD5jVdsoPI hSVoJyu3dKj/JnO9tXZUXY0Xa7LWW2Fexk32u90hIYkaumViJfqJmwA4GAQfr2B0TSfKxFrYGw0JI pgAMo2DgrEHSe5DO0KblevOFAdDDxt8Bq3/pTH3Xtif02FiGsdkMs+32rLDxC5n20hcLJCGX2WD4G B7uf3Q8lD3svrf/7ej9y39KoZDCrkDAhPlgqAafYw26dI+vHW4hG1rz++5nT9GD+umIBqkMN2nZNk l3cIinccJv18YYnViA6T/2/zDX2/503jnF2xJR9yKuoznRF7aPILsmmcjaGAA/FWQdSXqgTLnu7Db f2nhaejleFK9PHr6GB7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7yyy-000000089Sm-00ih; Fri, 17 May 2024 14:54:52 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7yy4-000000088aB-3364 for kvm-riscv@bombadil.infradead.org; Fri, 17 May 2024 14:53:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=e9KC0tuSdit7TUVEzTpSp24//kOo0UeQXa0Z7JvTEow=; b=PY/9f4+CycnlTFE/tnIpLtLg3Z gXhq16ECVkFKOrLBz3Lo1jLVZc4vVPpt6PYe+9KUcDUMw4mokk05JUpjU+W6slOswQow2L1abi/Sv WJWqO0OBlX0QAhqT/nBqRrtWs2FNdoHvL0xrU+lPADW1icAGcuKZKH8j6R6XJtBITk31wO8uAemT5 dg07l2vBx1Zi1/M6Xtv78wABqgJqnDsWLsAkpTd/GlufNYLEZOFalo4I2zKD7BnkganSnzJqnN2Ao f7MVUa7ZkoecSMTs78cB71oAHSvfI/lhYbaWsxwUAA2bTh0vh3KbJRqId9UfTWJSfT7uREGS+PGXR ExQaz0LQ==; Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7yxz-00000005itD-10mF for kvm-riscv@lists.infradead.org; Fri, 17 May 2024 14:53:54 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-351cb099fd7so39749f8f.0 for <kvm-riscv@lists.infradead.org>; Fri, 17 May 2024 07:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1715957616; x=1716562416; 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=e9KC0tuSdit7TUVEzTpSp24//kOo0UeQXa0Z7JvTEow=; b=anu3PWqUuKhXAkKNqvGhwE/q0B8jCDMJX/0uOsvfpRUZImnyzBqV+4TgqD9egj6FJe Cay1Vlysh2lvxfNWupf8gvmBk5286thPUXUJmgL/b7t/7pxrcODOOEPWz82fsttRaEgC UStT8QsevhV6py1s/fsKNJIeofXB3VHTAKMJlCq73hFl9FjxmfpYJos4BInTojIbfvKQ DmsoPxwNy4gOgoLz43niYXMqShcxLiR9jhEaYf1w2Xs0pI0Mpd7uBmC0cjytkHn3DUBQ zL9x/57stN3yDMk777moLpN7eYRpm/XF+IqvKFbuUuVcw3zQ/X1Ix8yDRfuVQjiTWRds 0YWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715957616; x=1716562416; 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=e9KC0tuSdit7TUVEzTpSp24//kOo0UeQXa0Z7JvTEow=; b=JAAq+CqWSOF5z9VVViH/Iax2O6u4koLnS1nyVcnfx3j1xPcvJ+bHSAKMNDxLDziJwZ TuFGUdHg7RPzr65MJS3Smw8MYnK8oEExzqT4TmKL1pEMw1SgTG3SJKZPxPxr2PFQXHvl HAmqj47KdnOiIA0xlmyyG6Igjlh7IoUdSCNzRTyXhunyaRMYep5daCjW/J/WmzDlHHQ/ Kk+wJ1ZgyR1wgSn84QIokTwGZgNM0MHS1G7eCm7KdqCvqIUONbNr79o3yfaZ1lXdKpf8 uNaj/vcM5mW5ya+U4TxUO47RX9TBEQKWmwiqp2NMRXQDZlJJfjeSmMpniKurl3PFmusX LVKg== X-Forwarded-Encrypted: i=1; AJvYcCV5ZSZ8oZLgD6bCsBIh8ia+l3e2wWvOezCa50S/oeXOwRQKPD0/DcahfXpTmEHeVZM4ylpK2wuggXXjvnPqwl8IpM26ctUXtmmKNeJ3tg== X-Gm-Message-State: AOJu0YwD7SYwuyC15lweLtK3g4CTnSP/nfyVa2dYbD99eOGUQlWS5kVm 1SZR8znXTWwpYp9BAJCmeL95dXhgaxmPxuaOUvd839XJcTgIXZUfU9GHUsmNT6M= X-Google-Smtp-Source: AGHT+IHzMauOaObmH6bJHd+GEHQtwrBkXzklFT3v/zPDqrR2YcC6kkpEK8DoADrBqc2G886rfeUyUA== X-Received: by 2002:a05:600c:3b26:b0:41f:cfe6:3646 with SMTP id 5b1f17b1804b1-41fead6b0f6mr159820025e9.4.1715957615814; Fri, 17 May 2024 07:53:35 -0700 (PDT) Received: from carbon-x1.. ([2a01:e0a:999:a3a0:46f0:3724:aa77:c1f8]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccce9431sm301723695e9.28.2024.05.17.07.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 07:53:35 -0700 (PDT) From: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= <cleger@rivosinc.com> To: Jonathan Corbet <corbet@lwn.net>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Conor Dooley <conor@kernel.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Anup Patel <anup@brainfault.org>, Shuah Khan <shuah@kernel.org> Cc: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= <cleger@rivosinc.com>, Atish Patra <atishp@atishpatra.org>, 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 v5 15/16] RISC-V: KVM: Allow Zcmop extension for Guest/VM Date: Fri, 17 May 2024 16:52:55 +0200 Message-ID: <20240517145302.971019-16-cleger@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517145302.971019-1-cleger@rivosinc.com> References: <20240517145302.971019-1-cleger@rivosinc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240517_155351_571440_86820EDF X-CRM114-Status: UNSURE ( 9.02 ) 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_=22desiato=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_Zcmop_extension_for_Guest/?= =?unknown-8bit?q?VM=2E_Signed-off-by=3A?= =?unknown-8bit?q?_Cl=C3=A9ment_L=C3=A9ger_=3Ccleger=40rivosinc=2Ecom=3E_Revi?= =?unknown-8bit?q?ewed-by=3A_Anup_Patel_=3Canup=40brainfault=2Eorg=3E?= =?unknown-8bit?q?_Acked-by=3A_Anup_Patel_=3Canup=40brainfault=2Eorg=3E_---_a?= =?unknown-8bit?q?rch/riscv/include/uapi/asm/kvm=2Eh?= =?unknown-8bit?q?_=7C_1_+_arch/riscv/kvm_=5B=2E=2E=2E=5D_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=280=2E0_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?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDo0MmQgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?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=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?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?= X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <kvm-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/kvm-riscv/> List-Post: <mailto:kvm-riscv@lists.infradead.org> List-Help: <mailto:kvm-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/kvm-riscv>, <mailto:kvm-riscv-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "kvm-riscv" <kvm-riscv-bounces@lists.infradead.org> Errors-To: kvm-riscv-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Add support for a few Zc* extensions, Zcmop and Zimop
|
expand
|
diff --git a/arch/riscv/include/uapi/asm/kvm.h b/arch/riscv/include/uapi/asm/kvm.h index 57db3fea679f..0366389a0bae 100644 --- a/arch/riscv/include/uapi/asm/kvm.h +++ b/arch/riscv/include/uapi/asm/kvm.h @@ -172,6 +172,7 @@ enum KVM_RISCV_ISA_EXT_ID { KVM_RISCV_ISA_EXT_ZCB, KVM_RISCV_ISA_EXT_ZCD, KVM_RISCV_ISA_EXT_ZCF, + KVM_RISCV_ISA_EXT_ZCMOP, KVM_RISCV_ISA_EXT_MAX, }; diff --git a/arch/riscv/kvm/vcpu_onereg.c b/arch/riscv/kvm/vcpu_onereg.c index 7d47fc910bd9..af4fefa189af 100644 --- a/arch/riscv/kvm/vcpu_onereg.c +++ b/arch/riscv/kvm/vcpu_onereg.c @@ -52,6 +52,7 @@ static const unsigned long kvm_isa_ext_arr[] = { KVM_ISA_EXT_ARR(ZCB), KVM_ISA_EXT_ARR(ZCD), KVM_ISA_EXT_ARR(ZCF), + KVM_ISA_EXT_ARR(ZCMOP), KVM_ISA_EXT_ARR(ZFA), KVM_ISA_EXT_ARR(ZFH), KVM_ISA_EXT_ARR(ZFHMIN), @@ -136,6 +137,7 @@ static bool kvm_riscv_vcpu_isa_disable_allowed(unsigned long ext) case KVM_RISCV_ISA_EXT_ZCB: case KVM_RISCV_ISA_EXT_ZCD: case KVM_RISCV_ISA_EXT_ZCF: + case KVM_RISCV_ISA_EXT_ZCMOP: case KVM_RISCV_ISA_EXT_ZFA: case KVM_RISCV_ISA_EXT_ZFH: case KVM_RISCV_ISA_EXT_ZFHMIN: