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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4905EC636D4 for ; Mon, 6 Feb 2023 16:44:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbjBFQoQ (ORCPT ); Mon, 6 Feb 2023 11:44:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbjBFQoN (ORCPT ); Mon, 6 Feb 2023 11:44:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8136D1D93F; Mon, 6 Feb 2023 08:44:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 25BCA60F85; Mon, 6 Feb 2023 16:44:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA53CC433EF; Mon, 6 Feb 2023 16:44:08 +0000 (UTC) Date: Mon, 6 Feb 2023 16:44:05 +0000 From: Catalin Marinas To: Marc Zyngier Cc: Mark Brown , Will Deacon , Oleg Nesterov , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Shuah Khan , Alan Hayward , Luis Machado , Szabolcs Nagy , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 07/21] arm64/sme: Enable host kernel to access ZT0 Message-ID: References: <20221208-arm64-sme2-v4-0-f2fa0aef982f@kernel.org> <20221208-arm64-sme2-v4-7-f2fa0aef982f@kernel.org> <86y1pbywbb.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86y1pbywbb.wl-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 06, 2023 at 09:31:20AM +0000, Marc Zyngier wrote: > From a6c4aaccd33e453ffc8d8ea23a4dd4d9a263cc89 Mon Sep 17 00:00:00 2001 > From: Marc Zyngier > Date: Mon, 6 Feb 2023 09:24:40 +0000 > Subject: [PATCH] arm64/sme: Fix __finalise_el2 SMEver check > > When checking for ID_AA64SMFR0_EL1.SMEver, __check_override assumes > that the ID_AA64SMFR0_EL1 value is in x1, and the intent of the code > is to reuse value read a few lines above. > > However, as the comment says at the beginning of the macro, x1 will > be clobbered, and the checks always fails. > > The easiest fix is just to reload the id register before checking it. > > Fixes: f122576f3533 ("arm64/sme: Enable host kernel to access ZT0") > Signed-off-by: Marc Zyngier Thanks Marc. I queued it on top of the for-next/sme2 branch. -- Catalin