Message ID | 20240806-kvm-arm64-get-reg-list-v2-0-1d3fbc7b6844@kernel.org (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 BA757C3DA64 for <linux-arm-kernel@archiver.kernel.org>; Tue, 6 Aug 2024 14:38:44 +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: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=y6jEfFMqUlpVmWhttbpDJXBnGGjd6qNB9v+kTVWjI8E=; b=NbIsJ18xCHaZIZ KAR2WB1jDv5pu+bWYu+z0Em91AKNLkbK0ACaEMO1fhDgBGuFeYMUC6R95Ob6kSVXLz2jOsx6KYtkK AVD8rChYXxaDkTcKpeV6sgByGfTRJs9OZvUQwGO7HJrmc/V6Us5xv6UXhvQ7PONZ5ODOOD+cuqAc4 uz0j+zEWXyF5HogAg9jCqJNroTQeKizVK6FvsN04lSSj+Hfjw6PmMuIKi7XNZWmc3nIWOZI9CB0V6 BaqAkqpcEOUB5OnGvVcToYh4sKS/KWlVgFPCy50E44D8TCLMBI2f6UZjukDMRsssUS/c/ftuYAwTF HdRYOmyXLPXNOOQelwtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbLKX-00000001zZJ-1RsM; Tue, 06 Aug 2024 14:38:29 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbLJz-00000001zMp-1vbg for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 14:37:57 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 7AD57CE0D2B; Tue, 6 Aug 2024 14:37:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13293C32786; Tue, 6 Aug 2024 14:37:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722955072; bh=5F/a2UAFCbcuKds0UHemgLchXdDzpsNufq+WS34s7TY=; h=From:Subject:Date:To:Cc:From; b=TwlfmkOjkmKrGB2oxo/vKQyhrP9hBRgAyg8S8ztRz9C4xhiKelolwhFqpAxIb+HqI AbyxrryL05k1KJZNr6VHt0ng4yEwCUvqe5RVLYJqh5IJta8E+Fv9PiRYT6Os2hDo9b B2RJFHxZJy3FN2/pPjjeuvWxW2zcxRVVLJNySjFrTuiGwHKUqx5gyDlPk7kBQbyZaV claIX7GGUjZkC+ZFGrvAaoQ9fGapGwfI7CQwsT9On86rc0PzCmmqkqeyu43mJvCMU4 MDlhzMRQymnQxOcgwX+DZE4jpySMKlbV9c9V7O1X7IIenm+WWM17Z6Zao0/Gp0jZeu 5rVHYAf5jljWQ== From: Mark Brown <broonie@kernel.org> Subject: [PATCH v2 0/3] KVM: selftests: arm64: Make use of sysreg defintions in get-reg-list Date: Tue, 06 Aug 2024 15:24:21 +0100 Message-Id: <20240806-kvm-arm64-get-reg-list-v2-0-1d3fbc7b6844@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIABYysmYC/4WNTQ6CMBCFr0Jm7ZhSoDSuvIdhUexQGv7MlDQa0 rtbuYDL7+W97x0QiD0FuBUHMEUf/LZmkJcCnqNZHaG3mUEKWQstJE5xQcOLqtHRjkwOZx92NFq Zqq2V6K2FPH4xDf59ih9d5jGXNv6cP7H8pX+VsUSBlWn6QQ9atKq5T8QrzdeNHXQppS9TTIovv QAAAA== To: Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Paolo Bonzini <pbonzini@redhat.com>, Shuah Khan <shuah@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Joey Gouly <joey.gouly@arm.com> Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org> X-Mailer: b4 0.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=2025; i=broonie@kernel.org; h=from:subject:message-id; bh=5F/a2UAFCbcuKds0UHemgLchXdDzpsNufq+WS34s7TY=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmsjU68/WV5P2u7RmlE2JOAjzGyS20eONW8lrOc5SL rnTPUz2JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZrI1OgAKCRAk1otyXVSH0IGdB/ 9jvWpYk/BIfnApqIH7uNCraWHJCs89PvHEWALj2z01/WeNGVvmx9dQiHgISElWrn0lUVqiTc+wfeAP 4VHvRg0EihU7gYrYxcFlILQ2GAz/3tAsA942qSozFFxfQZWsj1d0lQ4uft/nsafuqHLbM+DVTsIQMv 3S/Q6TesPXFIsF4MXinyqMOkM9zrq1nNk0LC1z8eETynMsxz/hGtXmzmrKUs40zw6Xkr4siVUc3dbX 4I7ljEEdyWYIJIXLflGRWBd6a5t+qUki0WV3apourOzQ8ofjpPJJpFbcqtTUHMAY5KS6amn3U1EX2n ul7VutQpDY2B4KmgZ0aMxtHOraehVc 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-20240806_073755_893135_450B001E X-CRM114-Status: GOOD ( 10.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: selftests: arm64: Make use of sysreg defintions in get-reg-list
|
expand
|
The system register definitions in the arm64 get-reg-list are all done with directly specified magic numbers rather than using the definitions we import from the main kernel. This is error prone, and requires us to audit the additions to get-reg-list separately to what we do when specifying the registers for the main kernel. Since Marc has indicated that this isn't a deliberate or desired choice let's start using the constants we have defined. We first manually update the data used to filter registers based on ID register fields to use a simplified macro that specifies the register and ID field in a muc more compact fashion. This is done first since there is an error in the ID register field for the S1PIE registers. We then replace all the remaining named system register specifications with use of the existing KVM_ARM64_SYS_REG() macro. This is just a first step, there's a bunch more work we could be doing here, the main thing being making use of the encodings in arch/arm64/tools/sysreg to convert more of the registers (including updating as more registers are converted to use the generator). Signed-off-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Add use of designated initalisers when converting filtering macros. - Manual handling of CNTV_CTL_EL0 and CNTV_CVAL_EL0. - Commit message tweaks. - Link to v1: https://lore.kernel.org/r/20240802-kvm-arm64-get-reg-list-v1-0-3a5bf8f80765@kernel.org --- Mark Brown (3): KVM: selftests: arm64: Simplify specification of filtered registers KVM: selftests: arm64: Use symbolic definitions for incorrect encodings KVM: selftests: arm64: Use generated defines for named system registers tools/testing/selftests/kvm/aarch64/get-reg-list.c | 244 ++++++++++----------- 1 file changed, 122 insertions(+), 122 deletions(-) --- base-commit: 8400291e289ee6b2bf9779ff1c83a291501f017b change-id: 20240802-kvm-arm64-get-reg-list-a86a37460bdd Best regards,