[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 5 May 2015 22:55:59 +0000
From: "Yu, Fenghua" <fenghua.yu@...el.com>
To: Dave Hansen <dave.hansen@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Andy Lutomirski <luto@...capital.net>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
"Thomas Gleixner" <tglx@...utronix.de>
Subject: RE: [PATCH 198/208] x86/fpu: Document the various fpregs state
formats
> From: Dave Hansen [mailto:dave.hansen@...ux.intel.com]
> Sent: Tuesday, May 05, 2015 12:52 PM
> To: Ingo Molnar; linux-kernel@...r.kernel.org
> Cc: Andy Lutomirski; Borislav Petkov; Yu, Fenghua; H. Peter Anvin; Linus
> Torvalds; Oleg Nesterov; Thomas Gleixner
> Subject: Re: [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.
Here is the "fix" patch Dave referred to: https://lkml.org/lkml/2015/4/22/9
>
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists