Re: [RFC] x86: xsave/xrstor support, ucontext_t extensions
From: Andi Kleen
Date: Tue May 20 2008 - 06:05:19 EST
Suresh Siddha wrote:
> On Mon, May 19, 2008 at 04:52:01PM +0200, Mikael Pettersson wrote:
>>> But we can
>>> use some what similar magic, if the fxsave/fxrstor give away
>>> some of the fields at the end of fxsave image (today it is reserved
>>> and ignored during fxsave/fxrstor) for software use.
>>> We can then use these fields at the end of fpstate, to indicate the presence of
>>> xstate. But this requires some architecture changes like giving
>>> away this space for SW use. We can take this to architects and
>>> see what they think.
>> If the HW doesn't store anything valuable there, we could store
>> SW flags/cookies there on signal delivery, and clear them before
>> fxrstor (unless the HW is known to ignore those fields).
>> But it depends on how forgiving the HW is.
>
> Ok. CPU folks are planning to make some of the bytes at the end of fxsave
> image, SW usable.
Are they always zeroed in earlier CPUs though? If not that wouldn't
work 100% reliably because whatever cookie you put in could have been
there before by chance.
I don't see anything in the SDM guaranteeing zeroing.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/