* [PATCH] FPU stack fault handling
@ 2004-08-05 20:55 Charles Coffing
0 siblings, 0 replies; only message in thread
From: Charles Coffing @ 2004-08-05 20:55 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
The sparse Linux trees have diverged from mainstream Linux in their
handling of FPU errors. I think mainstream Linux is correct.
According to the Pentium developer's manual in section 7.1.9, a stack
fault is a type of invalid operation. So stack faults will have the
invalid op bit set. The attached patch restores this behavior.
(Something mangled my previous inline patch, so I'm attaching this one
instead. Let's see if this one survives...)
--Charles
[-- Attachment #2: fpu.patch --]
[-- Type: application/octet-stream, Size: 1075 bytes --]
--- xeno-unstable/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/traps.c 2004-08-04 20:56:53.000000000 -0600
+++ xeno-unstable.fpu/linux-2.6.7-xen-sparse/arch/xen/i386/kernel/traps.c 2004-08-05 14:24:35.000000000 -0600
@@ -722,8 +722,8 @@
default:
break;
case 0x001: /* Invalid Op */
- case 0x040: /* Stack Fault XXX? */
- case 0x240: /* Stack Fault | Direction XXX? */
+ case 0x041: /* Stack Fault */
+ case 0x241: /* Stack Fault | Direction */
info.si_code = FPE_FLTINV;
/* Should we clear the SF or let user space do it ???? */
break;
--- xeno-unstable/linux-2.4.26-xen-sparse/arch/xen/kernel/traps.c 2004-08-04 20:56:51.000000000 -0600
+++ xeno-unstable.fpu/linux-2.4.26-xen-sparse/arch/xen/kernel/traps.c 2004-08-05 14:23:54.000000000 -0600
@@ -449,8 +449,8 @@
default:
break;
case 0x001: /* Invalid Op */
- case 0x040: /* Stack Fault */
- case 0x240: /* Stack Fault | Direction */
+ case 0x041: /* Stack Fault */
+ case 0x241: /* Stack Fault | Direction */
info.si_code = FPE_FLTINV;
break;
case 0x002: /* Denormalize */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-05 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 20:55 [PATCH] FPU stack fault handling Charles Coffing
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.