The old_exception field is initialized on startup with 0.
Therefore the very first fault (e.g. #GP) could be converted
to a double fault on an application processor. The attached
patch initialize old_exception on every CPU reset with -1.


        Bernhard Kauer
Index: target-i386/helper2.c
===================================================================
RCS file: /sources/qemu/qemu/target-i386/helper2.c,v
retrieving revision 1.47
diff -u -r1.47 helper2.c
--- target-i386/helper2.c	17 Apr 2007 23:08:56 -0000	1.47
+++ target-i386/helper2.c	31 Jul 2007 14:30:55 -0000
@@ -155,6 +155,8 @@
 
     tlb_flush(env, 1);
 
+    env->old_exception = -1;
+
     /* init to reset state */
 
 #ifdef CONFIG_SOFTMMU

Reply via email to