lkml.org 
[lkml]   [2015]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 198/208] x86/fpu: Document the various fpregs state formats
On 05/05/2015 10:58 AM, Ingo Molnar wrote:
> +/*
> + * This is our most modern FPU state format, as saved by the XSAVE
> + * and restored by the XRSTOR instructions.
> + *
> + * It consists of a legacy fxregs portion, an xstate header and
> + * subsequent fixed size areas as defined by the xstate header.
> + * Not all CPUs support all the extensions.
> + */
> struct xregs_state {
> struct fxregs_state i387;
> struct xstate_header header;
> @@ -150,6 +169,13 @@ struct xregs_state {
> /* New processor state extensions will go here. */
> } __attribute__ ((packed, aligned (64)));

Fenghua has a "fix" for this, but I think this misses a pretty big point.

This structure includes only the "legacy" state, followed by the header.
The remainder of the layout here is enumerated in CPUID leaves and can
not be laid out in a structure because we do not know what it looks like
until we run CPUID.

There is logically a variable length array at the end of this sucker.


\
 
 \ /
  Last update: 2015-05-05 22:21    [W:0.269 / U:9.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site