From patchwork Fri Aug 2 15:37:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13751709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF201C52D6F for ; Fri, 2 Aug 2024 15:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bm8evLEtOGWOQbFYYNpJ0BCpJN17718aMAAc2d5jCNA=; b=EXLJ5iJqqHkwk3J87J+J6lVCkd xaYSHDfZxwSfr9CETCn8ZBuFS+EbjfA1oToEo3+JIQ2CL8dT9a7kmGQ22vQRE4zUDWrndF2yiw9Wo bT0qPmzuYXbe9ev0tiskRbWOPuKGW65GemyVG4l4L8eenoO2mx+z1GrwDBhJISaN11PkDjnfFcOWl xA6+9rJoAjto0K9O/KzGtDrd0LlRYbTDT9Fuze7zYElbdgHKyeR4AbCM6yqK2d1JEw63KaUNJ5/lh zzTPfqgI/854o4xAWsuWSQSNjQDREBbybXClicsA4c4dePxGqyZqWliRUB/smr48hgbI5Rm+9EmJQ Cp3aeSWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZuR9-00000009JxP-1Ueh; Fri, 02 Aug 2024 15:43:23 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZuQB-00000009Jij-3s5X for linux-arm-kernel@lists.infradead.org; Fri, 02 Aug 2024 15:42:25 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2B22C62A92; Fri, 2 Aug 2024 15:42:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D33A0C4AF0D; Fri, 2 Aug 2024 15:42:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722613343; bh=0ccNknCx8NY78mfhENw9pRFYGFJerN5Iod19SIgGspo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=qfIQlkiN6KCoOu5uQBuR+iBpEwovMgYv8PhoUkkQvADV6S5tF/QPXYWyc4ws7uiYf A43QDhX1HnuxUz9BD5eiGdBKtDshgXH8KCHxdDmGSO7yAt5Erl7qdkk4ZjKA0iS8MC 04h9fy+repB+iWH/uaqKm/66r2uik2/lS0NqfgMJMvpjFfJsxf9lyobPz3WHyx9wha mu7OhGhgC4yqoQaO+P+eSZCY64nsVvVa3mQnDtKSIjuBW5+uCRM9o9I9f7b0yvv8Hw DUkP4SIteb/mONJURdmaXZOnYqbx7Tmw4GuGWReLzaX3eCwr1LB+kb1Aaqn3554wLP +/H7PLbsPuTNw== From: Mark Brown Date: Fri, 02 Aug 2024 16:37:33 +0100 Subject: [PATCH v2 1/2] KVM: arm64: Fix outdated comment about incomplete FGT bitmask definitions MIME-Version: 1.0 Message-Id: <20240802-kvm-arm64-fgt-doc-v2-1-b90183df14f6@kernel.org> References: <20240802-kvm-arm64-fgt-doc-v2-0-b90183df14f6@kernel.org> In-Reply-To: <20240802-kvm-arm64-fgt-doc-v2-0-b90183df14f6@kernel.org> To: Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Fuad Tabba Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=1309; i=broonie@kernel.org; h=from:subject:message-id; bh=0ccNknCx8NY78mfhENw9pRFYGFJerN5Iod19SIgGspo=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmrP5X8h/vTnMzeMdeQNnLe41ebB3+7wMfOigNGQhN yUL1PQ+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZqz+VwAKCRAk1otyXVSH0OYrB/ 96OhtxQ0pXenIcluf4V1mPe71qVgRgsmZpj1tv/09UD864WxeYMKF4Ikaq4fnTa2TVm9n0Sw6CmndP BKgu033vZ1oMSVeaY4H/Gr/MeYbkUlfY01JCei3d/ivGW+vojelZ3gVgWMvPOWqqXcDH7pMRI7JciM 0N185Nl57aahFsZuS5u8zKfucPc4CljawIaH44dQ77ta3I0NeUQdQV4AViFxJWzKu2W7mfFq76SdyT sa23xkcFH/s1ACZnohwSQfFl2PMbJ/JOd0kEJ0vJWHMJJ81YzOSvcSPraS8iMAzZh4H6XvA4hDKMrg PWPwBJuLtTfm6DG3iT2MmWULhlzVQq X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_084224_047062_DC16636E X-CRM114-Status: GOOD ( 12.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Comments in the code say that our definitions for the FGT registers are not the generated ones and are updated only as far as DDI0487 J.a. In commit 9ff67dd26a9e ("KVM: arm64: Use generated FGT RES0 bits instead of specifying them") we updated to use the generated definitions. As of the release of DDI0487 K.a the XML in DD0601 2024-06 is in sync with the ARM. Remove the outdated comment about divergence. Signed-off-by: Mark Brown --- arch/arm64/include/asm/kvm_arm.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index d81cc746e0eb..d347483395b4 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -342,12 +342,7 @@ /* * FGT register definitions * - * RES0 and polarity masks as of DDI0487J.a, to be updated as needed. - * We're not using the generated masks as they are usually ahead of - * the published ARM ARM, which we use as a reference. - * - * Once we get to a point where the two describe the same thing, we'll - * merge the definitions. One day. + * RES0 and polarity masks for the FGT registers. */ #define __HFGRTR_EL2_RES0 HFGxTR_EL2_RES0 #define __HFGRTR_EL2_MASK GENMASK(49, 0) From patchwork Fri Aug 2 15:37:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13751710 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D4EB2C3DA4A for ; Fri, 2 Aug 2024 15:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=M6rLB/YzZ+y0XVODAAUaeITPOufCHIomwAxE/hi4e3E=; b=vTj4nkRCSbRUNfJtMHjn/FVUjZ B+2fzBBsUaFsbmDmK8Klet/b7aqcPqJte/P9wGLWMles/OdHA3bztG3nt91HFzLwI1GzjhWxG1D6j Cx5tLD3qFwbnkHkm1/9soZHpg9lofIIAKP0erKrv0J/eU7rv9MPqjoUfWfnfdBknNcT61wwx24bgG +6zzOkPAfJGs0uTuFmTsN59e7KYbFmKhKJk6i9Nqui5G1dQ52kp5Fq7GRRCaHFWeiNE4sM5TvxoVy OCMhBL4jQ4bSqGwo9zhC6SeRWn0NjMxd4Cgag6JXp03AcI4Id8P+iz8YN9zlwsogEfGcO1MZEjrMA wJKuzkgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZuRb-00000009K6S-17EF; Fri, 02 Aug 2024 15:43:51 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZuQE-00000009JjM-1mhu for linux-arm-kernel@lists.infradead.org; Fri, 02 Aug 2024 15:42:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id AF36262A94; Fri, 2 Aug 2024 15:42:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65057C4AF0B; Fri, 2 Aug 2024 15:42:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722613345; bh=8qgLCzLY9Ucp9hk+V/+vkRMc+zhUAi0FQD5ni0RyeeU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PfwQYSJmYqbMUfZnCrN/1QlRzykzZxgqQSgVAxDGrWFWvd3mFMRmOfZQsCwnfI6Ce 4QtMKdOzB38LugkZd+zhkXHZH5DBTZSgXQEz50WgK1RF+Er4Y1lMjus7dGFHXoUqHK 73MkVZFgiOpPDMv6eb3jqzro6fSisCMHoe36P4nHfUE4VislIHgsa2Bgzh/T+lX/rD xnLUudRoqlyTs8kpZbBDn/A5fCxGt8iC+x75qPLWqRlXxSXSQ7pAtaAtbTpZbPUgL5 LsB0H62UJcC1tEPgdb/C7Bg+5usCcOUju2lp+hZ0qHv3AbNrr49mMWKEOrxoj45Vlq rfdKt8+jYQEFg== From: Mark Brown Date: Fri, 02 Aug 2024 16:37:34 +0100 Subject: [PATCH v2 2/2] KVM: arm64: Clarify meaning of _MASK and _nMASK for FGT registers MIME-Version: 1.0 Message-Id: <20240802-kvm-arm64-fgt-doc-v2-2-b90183df14f6@kernel.org> References: <20240802-kvm-arm64-fgt-doc-v2-0-b90183df14f6@kernel.org> In-Reply-To: <20240802-kvm-arm64-fgt-doc-v2-0-b90183df14f6@kernel.org> To: Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Fuad Tabba Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=810; i=broonie@kernel.org; h=from:subject:message-id; bh=8qgLCzLY9Ucp9hk+V/+vkRMc+zhUAi0FQD5ni0RyeeU=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmrP5YO7RJykSH22sWZkJURoH9pVKOPhgIM1gdPhS/ +N8sOICJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZqz+WAAKCRAk1otyXVSH0GgqB/ 0WDRaulOrP3uRjVxV7cEXnjUjPTgiWZAwAaW9ZgP4a04ixdalxkqVoL/02G/SYmvETK6Og5rZ+8EX+ fmAFAWoBk5mDOIVqWyJeS1PXOaP7AQTNqOjmSxQJymdF2Xmf9HUGGH4EGmmTkKsmJcR7aVL9kmG1UZ 2dH2Zm2AoCbTEiC/AsCJtwVeXxLYjq1YVlMLIduAjcn/fpjcTS6TQhXfVMfli2HLksIP2SZaJwqdjH EWaa3X+N9rj1W6ntw+S9O1PLv4RWaDPFPSs7IeEYzVoeC51zNvUJ80+j/YEwsYtXBNFdQEhIRHjbCI jfenPFAsqTXy8TfFtwsGVBK8/bNDPB X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_084226_560376_E36A4673 X-CRM114-Status: UNSURE ( 9.38 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the use of _MASK to mean bits where setting the bit causes traps to be generated is a little unusual add a clarifying comment. Signed-off-by: Mark Brown --- arch/arm64/include/asm/kvm_arm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index d347483395b4..c2f387905d9c 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -343,6 +343,10 @@ * FGT register definitions * * RES0 and polarity masks for the FGT registers. + * + * _RES0: Bits which are RES0 + * _MASK: Bits with positive polarity + * _nMASK: Bits with negative polarity */ #define __HFGRTR_EL2_RES0 HFGxTR_EL2_RES0 #define __HFGRTR_EL2_MASK GENMASK(49, 0)