From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D31B433BBB8 for ; Thu, 29 Jan 2026 16:39:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769704778; cv=none; b=D2Ia20CCya0pHq4eif+5ORDgeXTJVgbthLN2je29bE8g5EIabfT049V3t/AcW86JrJ3vfbxiXzVmRJffI2bLehmkDQUzSooAkln8J23epqRTHwfoBup/Gk6yrWaYeZsUxP7gxGpT4QxIRYoGzQyb/B4nAufk0C4Y1IPKXsuIE7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769704778; c=relaxed/simple; bh=B/VHJ92gUrkCQ08cznGlZPMEjHU0vpIWoo2Ylnqd+/4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=ZIKaS/Uz3+NXoLupJr6ce6348PVNDRrRTM4Dpio2+y+1uqw35auMJjl8Z52Vg7QdXyCLBkbCIWvyBZZ47aGNbrk6Sa11mZkPPTUNGPARWyQ86kq2sXlFBHfJT/gcYk+BeiIWMEA/TRoILijJjUEr1gxuyEwZ/LFm/t3mCtWBrFE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XPYYX1fN; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XPYYX1fN" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4806dffc64cso9308715e9.1 for ; Thu, 29 Jan 2026 08:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1769704775; x=1770309575; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=twFvpc0i3TryasBkxK98iJJPXOi65K0zMxpJo29cyB0=; b=XPYYX1fNq1dgLxdSTF1N1yUorRWvWx5EkK+2Kuggn1NUHsQcWi6kp0TNUsxMDB+Qj/ q0fShi7qygpWlXHgi69hsgcy8ZtbF9wfItkUznZxHwXX4uex4P2YONiobHI4rrqqNLv2 Gm0pfk7Xb07ViNIDhdmS2zbQgKdU5HPQgZu6He3kVhyoa18Z0ogLlR+1CotAc2ETDyPL UKTPtcRzxRt1AACkZ2losHDEGlzNIx6vPlHmOYvNXG6Kbh0MS1ZbHK4YbHEzlLz0438+ 12KO0UMTZwtc3wboiTKDjSyNEcPV3KkkgtLBL/8Li74N+BcO32d3VQYEsd+s/euFvgHG NMSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769704775; x=1770309575; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=twFvpc0i3TryasBkxK98iJJPXOi65K0zMxpJo29cyB0=; b=gaIRZmpnVkRTZiBG1byVuA1nCoVFDw0Cv2Mmr5mDIjYbiZbSJ7d2gajWPSUdBOo6YR XW3i/51dyV560VBXrq4x+oUVByvrEmy9H4GegfPEY4zdSHlUJVtduaEKVeUM56pVWz+t RqZIar7bcP8dVAqLMeITxOVb1iCaAq+xfgzpbIHm3+mWH/t4gaIJFLem9+Caiz8GT1q4 56F7PY8RShjgXZMVZ7jyIyzLuWZ9eSZt0zL7eHwnc/4czhF62XPcscrBJ3U5yp2DMffB bbf4jiUXoXK+fUzJLEc1cu9X4Tn/eJrXY/aLU77KORCcIhdwWFC6VcMckQJYvkR+umly 30HQ== X-Forwarded-Encrypted: i=1; AJvYcCWTUDCsBHBQxPRsCvsfa0OwrhIoAWkno+zM9JI5tfd3GK1/txEuQXNQ8SIpkdQYJSMNoCYQlihJUjw=@vger.kernel.org X-Gm-Message-State: AOJu0YxJs0Rynmb2JCLpr6eXpuXF+8hJG/1mRiao7GfRmqXk2C/QbHHH rqqIgpeXjUCLHPWklQqQIBFCsdgpsjWhCTPhMkOY8itr+jTAQPwbcJFRu+YaUu5llsY= X-Gm-Gg: AZuq6aJgX9PHPUwm3p6SSNDlA9I6qsy14fTJCcMlpSsrr+h+69smg8EXvi+s7WSiWah Y+BbQ48YtxyTDJObn/BkRHh2gkow2F5+szLFWzZAbkcB09OBp6QLk2IakkW7oaoc0/1Yqhu/Tko CxsLrGM+D6eyXQslLXBlVF7BYsojCvgAr2NhXUrx7yflnMznrBy1AUeQ/VQwS8qX9TBSt/5qDuf 4IS4w2yRz9z/Lg/KbhMxdcUKf2D5WXQ3wA86ykFm288h5kpd1MO9OWsSySuOxsPF8nOUbPcVuD/ eRIkViGFNmEBIsCL1CPQucwu/D1whEZBVhwyiSSwF6CZJpEAnEHq+pXTS6B6mt2X1nk8DeCgSoi jm8XwX3+y3vir4E7wNyyNWbPoLKfGSJdN/2zwwrkR2Z6bnJfWjvaJ2yKEYpxfeBFQOGOsV+unzh Vef+6N6mN4csc= X-Received: by 2002:a05:6000:184e:b0:432:5b81:48b with SMTP id ffacd0b85a97d-435f3ad5c6dmr249217f8f.61.1769704775134; Thu, 29 Jan 2026 08:39:35 -0800 (PST) Received: from draig.lan ([185.124.0.126]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-435e131cfd4sm14914838f8f.25.2026.01.29.08.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 08:39:34 -0800 (PST) Received: from draig (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A5D885F878; Thu, 29 Jan 2026 16:39:33 +0000 (GMT) From: =?utf-8?Q?Alex_Benn=C3=A9e?= To: Mark Brown Cc: Marc Zyngier , Joey Gouly , Catalin Marinas , Suzuki K Poulose , Will Deacon , Paolo Bonzini , Jonathan Corbet , Shuah Khan , Oliver Upton , Dave Martin , Fuad Tabba , Mark Rutland , Ben Horgan , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Peter Maydell , Eric Auger Subject: Re: [PATCH v9 04/30] arm64/fpsimd: Check enable bit for FA64 when saving EFI state In-Reply-To: <20251223-kvm-arm64-sme-v9-4-8be3867cb883@kernel.org> (Mark Brown's message of "Tue, 23 Dec 2025 01:20:58 +0000") References: <20251223-kvm-arm64-sme-v9-0-8be3867cb883@kernel.org> <20251223-kvm-arm64-sme-v9-4-8be3867cb883@kernel.org> Date: Thu, 29 Jan 2026 16:39:33 +0000 Message-ID: <87343o8jay.fsf@draig.linaro.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark Brown writes: > Currently when deciding if we need to save FFR when in streaming mode pri= or > to EFI calls we check if FA64 is supported by the system. Since KVM guest > support will mean that FA64 might be enabled and disabled at runtime swit= ch > to checking if traps for FA64 are enabled in SMCR_EL1 instead. > > Signed-off-by: Mark Brown > --- > arch/arm64/kernel/fpsimd.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c > index 887fce177c92..f4e8cee00198 100644 > --- a/arch/arm64/kernel/fpsimd.c > +++ b/arch/arm64/kernel/fpsimd.c > @@ -1948,6 +1948,11 @@ static bool efi_sm_state; > * either doing something wrong or you need to propose some refactoring. > */ >=20=20 > +static bool fa64_enabled(void) > +{ > + return read_sysreg_s(SYS_SMCR_EL1) & SMCR_ELx_FA64; > +} > + > /* > * __efi_fpsimd_begin(): prepare FPSIMD for making an EFI runtime servic= es call > */ > @@ -1980,7 +1985,7 @@ void __efi_fpsimd_begin(void) > * Unless we have FA64 FFR does not > * exist in streaming mode. > */ > - if (!system_supports_fa64()) > + if (!fa64_enabled()) > ffr =3D !(svcr & SVCR_SM_MASK); > } >=20=20 > @@ -2028,7 +2033,7 @@ void __efi_fpsimd_end(void) > * Unless we have FA64 FFR does not > * exist in streaming mode. > */ > - if (!system_supports_fa64()) > + if (!fa64_enabled()) > ffr =3D false; > } > } This is conflicting with the now merged 63de2b3859ba1 (arm64/efi: Remove unneeded SVE/SME fallback preserve/store handling) so I think this patch can now be dropped? --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro