qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Reboot CPU on triple fault
@ 2008-03-29 18:13 Hervé Poussineau
  2008-03-30  1:36 ` Alexander Graf
  0 siblings, 1 reply; 40+ messages in thread
From: Hervé Poussineau @ 2008-03-29 18:13 UTC (permalink / raw)
  To: qemu-devel

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

Hi,

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

Hervé

[-- Attachment #2: triple_fault.patch --]
[-- Type: text/plain, Size: 1064 bytes --]

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;


^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2008-05-27 16:17 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-29 18:13 [Qemu-devel] [PATCH] Reboot CPU on triple fault Hervé Poussineau
2008-03-30  1:36 ` Alexander Graf
2008-03-31  9:52   ` Kevin Wolf
2008-04-15 16:05     ` [Qemu-devel] " Jan Kiszka
2008-04-15 16:57       ` Paul Brook
2008-04-16  8:37         ` Kevin Wolf
2008-04-16  9:23           ` Jamie Lokier
2008-04-16  9:51             ` Antoine Kaufmann
2008-04-16  9:53             ` Kevin Wolf
2008-04-16 10:17               ` Michal Schulz
2008-04-16 10:25                 ` Michal Schulz
2008-04-16 12:08                 ` Kevin Wolf
2008-04-16 10:22               ` Jan Kiszka
2008-04-16 11:34               ` Jamie Lokier
2008-04-16 14:44         ` Anthony Liguori
2008-04-16  8:18       ` Kevin Wolf
2008-04-16 12:02         ` Jan Kiszka
2008-04-16 12:09           ` Avi Kivity
2008-04-16 12:36           ` Kevin Wolf
2008-04-16 12:57             ` Jamie Lokier
2008-04-16 12:44       ` [Qemu-devel] [PATCH] x86: Reboot CPU on triple fault - Version 3 Jan Kiszka
2008-04-16 13:35         ` [Qemu-devel] [PATCH] x86: Reboot CPU on triple fault - Version 4 Kevin Wolf
2008-04-16 14:18           ` [Qemu-devel] " Jan Kiszka
2008-04-16 14:33             ` [Qemu-devel] [PATCH] x86: Reboot CPU on triple fault - Version 5 Kevin Wolf
2008-04-16 14:57               ` [Qemu-devel] [PATCH] x86: Reboot CPU on triple fault - Version 6 Kevin Wolf
2008-04-17  9:52                 ` [Qemu-devel] " Jan Kiszka
2008-04-18 14:06                 ` [Qemu-devel] " Anthony Liguori
2008-04-21 11:53                   ` Kevin Wolf
2008-05-26 14:46                     ` [Qemu-devel] " Jan Kiszka
2008-05-27 16:01                       ` [Qemu-devel] [PATCH] x86: Reboot CPU on triple fault - Version 8 Jan Kiszka
2008-05-27 16:17                         ` [Qemu-devel] " Jan Kiszka
2008-04-16 14:37           ` [Qemu-devel] Re: [PATCH] x86: Reboot CPU on triple fault - Version 4 Anthony Liguori
2008-04-17  8:07             ` Jan Kiszka
2008-04-17 12:49               ` Anthony Liguori
2008-04-17 14:10                 ` Jan Kiszka
2008-04-17 18:30                   ` Anthony Liguori
2008-04-17 19:24                     ` Jan Kiszka
2008-04-18  8:38                     ` Kevin Wolf
2008-04-18 14:08                       ` Anthony Liguori
2008-04-21  9:37                         ` Kevin Wolf

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).