Re: [PATCH v4 18/22] x86/fpu/amx: Define AMX state components and have it used for boot-time checks

2021-03-23 Thread Bae, Chang Seok
On Mar 20, 2021, at 14:31, Thomas Gleixner wrote: > On Sun, Feb 21 2021 at 10:56, Chang S. Bae wrote: >> >> +static void check_xtile_data_against_struct(int size) >> +{ >> +u32 max_palid, palid, state_size; >> +u32 eax, ebx, ecx, edx; >> +u16 max_tile; >> + >> +/* >> + *

Re: [PATCH v4 18/22] x86/fpu/amx: Define AMX state components and have it used for boot-time checks

2021-03-20 Thread Thomas Gleixner
On Sun, Feb 21 2021 at 10:56, Chang S. Bae wrote: > > +static void check_xtile_data_against_struct(int size) > +{ > + u32 max_palid, palid, state_size; > + u32 eax, ebx, ecx, edx; > + u16 max_tile; > + > + /* > + * Check the maximum palette id: > + * eax: the highest

[PATCH v4 18/22] x86/fpu/amx: Define AMX state components and have it used for boot-time checks

2021-02-21 Thread Chang S. Bae
Linux uses check_xstate_against_struct() to sanity check the size of XSTATE-enabled features. AMX is the XSAVE-enabled feature, and its size is not hard-coded but discoverable at run-time via CPUID. The AMX state is composed of state components 17 and 18, which are all user state components. The