qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Patch: fix init of old_exception
@ 2007-07-31 14:43 Bernhard Kauer
  0 siblings, 0 replies; only message in thread
From: Bernhard Kauer @ 2007-07-31 14:43 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

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

[-- Attachment #2: qemu_init_old_exception.diff --]
[-- Type: text/x-diff, Size: 447 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-31 14:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-31 14:43 [Qemu-devel] Patch: fix init of old_exception Bernhard Kauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).