From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6453] x86: Issue reset on triple faults (Jan Kiszka)
Date: Mon, 26 Jan 2009 19:54:41 +0000 [thread overview]
Message-ID: <E1LRXXd-0003Zv-Qy@cvs.savannah.gnu.org> (raw)
Revision: 6453
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6453
Author: aliguori
Date: 2009-01-26 19:54:36 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
x86: Issue reset on triple faults (Jan Kiszka)
As discussed a few times on this list: A triple fault causes a system
reset on x86, and some guests make use of this (e.g. 386BSD). To keep
the chance of tracing unexpected resets, log them if CPU_LOG_RESET is
set.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Modified Paths:
--------------
trunk/target-i386/op_helper.c
Modified: trunk/target-i386/op_helper.c
===================================================================
--- trunk/target-i386/op_helper.c 2009-01-26 19:54:31 UTC (rev 6452)
+++ trunk/target-i386/op_helper.c 2009-01-26 19:54:36 UTC (rev 6453)
@@ -1251,6 +1251,9 @@
}
}
+/* This should come from sysemu.h - if we could include it here... */
+void qemu_system_reset_request(void);
+
/*
* Check nested exceptions and change to double or triple fault if
* needed. It should only be called, if this is not an interrupt.
@@ -1267,9 +1270,19 @@
qemu_log_mask(CPU_LOG_INT, "check_exception old: 0x%x new 0x%x\n",
env->old_exception, intno);
- if (env->old_exception == EXCP08_DBLE)
- cpu_abort(env, "triple fault");
+#if !defined(CONFIG_USER_ONLY)
+ if (env->old_exception == EXCP08_DBLE) {
+ if (env->hflags & HF_SVMI_MASK)
+ helper_vmexit(SVM_EXIT_SHUTDOWN, 0); /* does not return */
+ if (loglevel & CPU_LOG_RESET)
+ fprintf(logfile, "Triple fault\n");
+
+ qemu_system_reset_request();
+ return EXCP_HLT;
+ }
+#endif
+
if ((first_contributory && second_contributory)
|| (env->old_exception == EXCP0E_PAGE &&
(second_contributory || (intno == EXCP0E_PAGE)))) {
next reply other threads:[~2009-01-26 19:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 19:54 Anthony Liguori [this message]
2009-01-27 10:15 ` [Qemu-devel] [6453] x86: Issue reset on triple faults (Jan Kiszka) Kevin Wolf
2009-01-27 10:24 ` Jan Kiszka
2009-01-27 10:33 ` Kevin Wolf
2009-01-27 10:31 ` Jan Kiszka
2009-01-29 17:04 ` Anthony Liguori
2009-01-29 17:21 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1LRXXd-0003Zv-Qy@cvs.savannah.gnu.org \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).