[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86le1g19aa.wl-maz@kernel.org>
Date: Thu, 01 Aug 2024 17:45:49 +0100
From: Marc Zyngier <maz@...nel.org>
To: Mark Brown <broonie@...nel.org>
Cc: Oliver Upton <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Paolo Bonzini <pbonzini@...hat.com>,
Shuah Khan <shuah@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Joey Gouly <joey.gouly@....com>,
linux-arm-kernel@...ts.infradead.org,
kvmarm@...ts.linux.dev,
kvm@...r.kernel.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list
On Wed, 31 Jul 2024 17:21:13 +0100,
Mark Brown <broonie@...nel.org> wrote:
>
> The ID register for S1PIE is ID_AA64MMFR3_EL1.S1PIE which is bits 11:8 but
> get-reg-list uses a shift of 4, checking SCTLRX instead. Use a shift of 8
> instead.
>
> Fixes: 5f0419a0083b ("KVM: selftests: get-reg-list: add Permission Indirection registers")
> Signed-off-by: Mark Brown <broonie@...nel.org>
> ---
> tools/testing/selftests/kvm/aarch64/get-reg-list.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> index 709d7d721760..4abebde78187 100644
> --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c
> @@ -32,13 +32,13 @@ static struct feature_id_reg feat_id_regs[] = {
> {
> ARM64_SYS_REG(3, 0, 10, 2, 2), /* PIRE0_EL1 */
> ARM64_SYS_REG(3, 0, 0, 7, 3), /* ID_AA64MMFR3_EL1 */
> - 4,
> + 8,
> 1
> },
> {
> ARM64_SYS_REG(3, 0, 10, 2, 3), /* PIR_EL1 */
> ARM64_SYS_REG(3, 0, 0, 7, 3), /* ID_AA64MMFR3_EL1 */
> - 4,
> + 8,
> 1
> }
> };
Thanks for spotting this. However, we are fixing it in a very backward
way.
Can we please switch all this stuff to symbolic naming instead of
magic numbers? Given how much effort is going into the "automated
generation" thing, it is mind-boggling that the tests still rely on
handcrafted numbers. We just end-up with two different sets of bugs.
At the moment, the level of confidence I have in this stuff is
sub-zero.
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists