From mboxrd@z Thu Jan 1 00:00:00 1970 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 5766FC3DA64 for ; Thu, 1 Aug 2024 16:46:33 +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:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LhguKbJQ7QPa9W3nMvcuSll/zg1Pb0MFPeYejKEc37Q=; b=uF9vAmHc73X7GxxRZAQk26ER1j RK9ogQZII1zKgpeYBzON9Gx5kLRrN/MgXxXG5ENz7MveEHFKFGFxZ5pVgiy6/5KCMb7Wj0pM1lf7A BMzZfJnqPGVWif5860r3l2iDc9CVQ0xY6d9JWpDdSPtbrseeK3y2P9tw8oJomJRN0Fm1muglwp3Vr 2i2AZw0GwizMCj6X2ybD8FoHHwYLnPGmfITaJ3ooUE2RU8DF7NYNa6p2ShYB9odpBUNHJlLaoC/6n upij8/KeiCRKgK/fAPkS1T/XB2CgjnS+CyORiyfdlAP7sLOWhPkzhfe6t2I0/Dr26fjSLKyoyq5iw lMMjtq7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZYwa-000000069HK-3jzF; Thu, 01 Aug 2024 16:46:24 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZYw6-0000000699c-2rPs for linux-arm-kernel@lists.infradead.org; Thu, 01 Aug 2024 16:45:56 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id ADC58CE1846; Thu, 1 Aug 2024 16:45:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB49EC32786; Thu, 1 Aug 2024 16:45:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722530751; bh=9K8/1ZKy51T9Ax3Xh2WIgRnxkcihHgffb1DNF0IENQQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KscuT4xqJXdHZXNNabFmnRhf9Y+fGFdNBEfaZHinesb/+F44xEIOj28bdj+DHMD7O qegrmkvL4KFgE4UK/dVJvnqeg8awqUImJbw0dXGzbkqTlcWWnqodHRwH61q5TcOhy4 pS4B/RFonxyvQ/Kw0tbWXc8twvOZLF5+YL27DxUe6ugYEZN280C/ZN7851On1DNpU+ KxrkszkzkoCf9DCCsjAEZXc0kxOUjaoyg3gGtFAS4j/Voe0gMqJgXPl1JmBQaZMh7J tIRiyVdns9GVeGnuJIa3AG/splbo8jObmHDdRWTEHFx2b5IHRINuVw2YmkcKRQ3ohW pP6fqmGeqt7Jg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sZYw1-00HTHq-IK; Thu, 01 Aug 2024 17:45:49 +0100 Date: Thu, 01 Aug 2024 17:45:49 +0100 Message-ID: <86le1g19aa.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Oliver Upton , James Morse , Suzuki K Poulose , Paolo Bonzini , Shuah Khan , Catalin Marinas , Joey Gouly , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list In-Reply-To: <20240731-kvm-arm64-fix-s1pie-test-v1-1-a9253f3b7db4@kernel.org> References: <20240731-kvm-arm64-fix-s1pie-test-v1-1-a9253f3b7db4@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.3 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: broonie@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, pbonzini@redhat.com, shuah@kernel.org, catalin.marinas@arm.com, joey.gouly@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240801_094555_094474_0064F224 X-CRM114-Status: GOOD ( 22.59 ) 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 On Wed, 31 Jul 2024 17:21:13 +0100, Mark Brown 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 > --- > 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.