[PATCH v4 07/21] arm64/sme: Enable host kernel to access ZT0

Catalin Marinas catalin.marinas at arm.com
Mon Feb 6 08:44:05 PST 2023


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 <maz at kernel.org>
> 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 <maz at kernel.org>

Thanks Marc. I queued it on top of the for-next/sme2 branch.

-- 
Catalin



More information about the linux-arm-kernel mailing list