qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Reboot CPU on triple fault


From: Hervé Poussineau
Subject: [Qemu-devel] [PATCH] Reboot CPU on triple fault
Date: Sat, 29 Mar 2008 19:13:52 +0100
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

Hi,

On i386/x86-64, CPU must reboot when a triple fault is detected.
Attached patch implements this behaviour.

Hervé
Index: target-i386/helper.c
===================================================================
RCS file: /sources/qemu/qemu/target-i386/helper.c,v
retrieving revision 1.103
diff -u -r1.103 target-i386/helper.c
--- target-i386/helper.c        28 Mar 2008 22:30:30 -0000      1.103
+++ target-i386/helper.c        28 Mar 2008 22:55:52 -0000
@@ -1276,6 +1276,11 @@
 {
     if (!is_int) {
         svm_check_intercept_param(SVM_EXIT_EXCP_BASE + intno, error_code);
+        if (env->old_exception == EXCP08_DBLE) {
+            cpu_loop_exit();
+            cpu_reset(env);
+            return;
+        }
         intno = check_exception(intno, &error_code);
     }
 
@@ -1289,6 +1294,11 @@
 /* same as raise_exception_err, but do not restore global registers */
 static void raise_exception_err_norestore(int exception_index, int error_code)
 {
+    if (env->old_exception == EXCP08_DBLE) {
+        cpu_loop_exit();
+        cpu_reset(env);
+        return;
+    }
     exception_index = check_exception(exception_index, &error_code);
 
     env->exception_index = exception_index;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]