This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] wget and Zope crashes on post-2.0.6 -testing

On 8 Jun 2005, at 22:42, Kurt Garloff wrote:

I think that should work (with the obvious kernel_ prefix), but I've
appeneded what we've gone for.

Not having a CPU manual close to my desk: What do we achieve by setting
bit 3 (TS) in CR0? Why does it help to get the FPU back to a sane state?

When set it causes a fault whenever the FPU is accessed. We use it to lazily initialise the FPU for the currently running process. At context-switch time we look at the process we are descheduling and, if it hasn;t used the FPU in its time slice, we don;t save FPU state and we don;t set the TS bit (because we assume it must be already set).

The last point is where we can fall down: if the TS bit in fact *isn;t* set, then we are screwed for all time. The kernel will never realise a process is using the FPU because we will never take the TS fault, because the TS bit is clear. Thus state doesn;t get saved/restored during context switch and the TS bit never gets set. So its a self perpetuating state once you're in it.

 -- Keir

Xen-devel mailing list