Linus Torvalds wrote: > > On Fri, 19 Apr 2002, Brian Gerst wrote: > >>Here's a patch to do just that. It initializes the saved state in the >>task struct and falls through to restore_fpu(). > > > One issue is whether we _can_ restore a "generated" image like this: it's > entirely possible that Intel might save away internal CPU shadow data in > the save-state structure, and future CPU's might be unhappy about loading > data that doesn't conform to what the CPU would save. > > That said, the same issue is certainly true for just doing "xorps", since > that will not clear any potential future CPU state. > > I get this feeling that Intel screwed up on specifying how to initialize > this whole state. > > Linus > I don't know about Intel, but the Athlon doesn't appear to save anything in the "reserved" areas. The values that I use to initialize the state are from what is saved after loading the stack with zeroes (fldz) and then doing finit. I have samples of the saved state from a P2, a K6-2, and an Athlon XP. Attached is a revised patch. I had the cpu_has_xmm test wrong. -- Brian Gerst