[RFC PATCH] arm64/sve,sme: Refine scalable regset sizes at boot

Mark Brown broonie at kernel.org
Wed Feb 7 02:04:56 PST 2024


On Mon, Feb 05, 2024 at 05:27:20PM +0000, Dave Martin wrote:

> index a5dc6f764195..5c2f91f84c31 100644
> --- a/arch/arm64/kernel/fpsimd.c
> +++ b/arch/arm64/kernel/fpsimd.c
> @@ -1189,6 +1189,7 @@ void __init sve_setup(void)
>  		pr_warn("%s: unvirtualisable vector lengths present\n",
>  			info->name);
>  
> +	arch_ptrace_sve_init(sve_vq_from_vl(info->max_vl));
>  	sve_efi_setup();
>  }

This will only get run if the system actually supports SVE since the
first thing that sve_setup() does is to exit if the system does not
support SVE.  That means that the size limiting will only be done on
systems that have SVE, but since we unconditionally register all our
regsets if the system doesn't have SVE it will end up with a maximally
sized SVE regset registered which doesn't seem ideal.  As I mentioned in
the other thread we should probably just not be registering unsupported
regsets with the core, that would avoid the issue without a change to
this patch.

A similar issue applies for SME.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240207/2343667e/attachment-0001.sig>


More information about the linux-arm-kernel mailing list