Re: [PATCH v2 7/7] arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly
From: Catalin Marinas
Date: Fri Jan 10 2020 - 09:49:54 EST
On Tue, Dec 17, 2019 at 06:34:02PM +0000, Suzuki K Poulose wrote:
> diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
> index 3eb338f14386..240c52b71cda 100644
> --- a/arch/arm64/kernel/fpsimd.c
> +++ b/arch/arm64/kernel/fpsimd.c
> @@ -269,7 +269,7 @@ static void sve_free(struct task_struct *task)
> */
> static void task_fpsimd_load(void)
> {
> - WARN_ON(!have_cpu_fpsimd_context());
> + WARN_ON(!system_supports_fpsimd() || !have_cpu_fpsimd_context());
Nitpick: in the other functions you kept to WARN_ONs, apart from this
one where you added a ||.
Other than the KVM bits:
Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>