lkml.org 
[lkml]   [2024]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] platform/x86/intel/ifs: Initialize AMX state for the scan test
On Tue, Apr 30, 2024 at 02:25:08PM -0700, Bae, Chang Seok wrote:
> The scan test does not start when the AMX state remains active and is not
> re-initialized. With the extension of kernel_fpu_begin_mask(), the driver
> code can now initialize the state properly.

Avoid "re-initialized" and maybe use the same SDM language here as well?

Infield Scan aborts if AMX state is not in initialized state. Use
the kernel_fpu_begin_mask(KFPU_AMX) to ensure AMX state is initialized.

>
> Introduce custom FPU handling wrappers to ensure compliant with the
> established FPU API semantics, as kernel_fpu_begin() exclusively sets
> legacy states. This follows the EFI case from commit b0dc553cfc9d
> ("x86/fpu: Make the EFI FPU calling convention explicit").

The EFI and commit mention is worthy of prior use, but the first line
isn't reading well... Maybe

Introduce custom FPU handling wrappers to ensure compliance with the
established FPU API semantics. This change follows the EFI case from
commit b0dc553cfc9d ("x86/fpu: Make the EFI FPU calling convention explicit").

I dropped the note about legacy states, I didn't quite know how to word
that.

>
> Then, use these wrappers to surround the MSR_ACTIVATE_SCAN write to
> minimize the critical section. To prevent unnecessary delays, invoke
> ifs_fpu_begin() before entering the rendezvous loop.
>
> Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
> Reviewed-by: Jithu Joseph <jithu.joseph@intel.com>
> Tested-by: Jithu Joseph <jithu.joseph@intel.com>

\
 
 \ /
  Last update: 2024-05-27 18:11    [W:0.132 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site