Subject: port-i386/19955: Geniune i386 NPX handling broken in SA universe
To: None <gnats-bugs@gnats.netbsd.org>
From: None <thorpej@shagadelic.org>
List: netbsd-bugs
Date: 01/20/2003 10:08:58
>Number:         19955
>Category:       port-i386
>Synopsis:       Geniune i386 NPX handling broken in SA universe
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 20 10:10:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jason R Thorpe
>Release:        NetBSD 1.6M
>Organization:
Wasabi Systems, Inc.
>Environment:
	
	
>Description:
	From the "sa-TODO" file:

	cpu_getmcontext() may call npxsave(), which can only be run at
	spl0, which is a problem.  Options

	* Change npxsave() to avoid that requirement.
	* Don't save FP context at getcontext() time, but do something
	  More Clever with lazy FPU switching.

	My commentary:

	This only affects SA-enabled processes (i.e. ones using libpthread)
	and only affects real i386 processors (i.e. the ones that report FP
	traps through IRQ 13).  The call graph for this looks roughly like:

	tsleep [splsched] -> sa_switch -> sa_upcall0 -> sa_upcall_getstate ->
	    getucontext -> cpu_getmcontext

>How-To-Repeat:

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: