From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JqGfH-0000qK-TQ for qemu-devel@nongnu.org; Sun, 27 Apr 2008 19:52:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JqGfH-0000pr-14 for qemu-devel@nongnu.org; Sun, 27 Apr 2008 19:52:15 -0400 Received: from [199.232.76.173] (port=57354 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JqGfG-0000pi-K6 for qemu-devel@nongnu.org; Sun, 27 Apr 2008 19:52:14 -0400 Received: from savannah.gnu.org ([199.232.41.3] helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JqGfG-00029I-6G for qemu-devel@nongnu.org; Sun, 27 Apr 2008 19:52:14 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JqGfF-00009I-0o for qemu-devel@nongnu.org; Sun, 27 Apr 2008 23:52:13 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JqGfE-00009C-QT for qemu-devel@nongnu.org; Sun, 27 Apr 2008 23:52:12 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 27 Apr 2008 23:52:12 +0000 Subject: [Qemu-devel] [4271] Add a monitor command to raise NMI Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4271 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4271 Author: aurel32 Date: 2008-04-27 23:52:12 +0000 (Sun, 27 Apr 2008) Log Message: ----------- Add a monitor command to raise NMI (Jan Kiszka) Modified Paths: -------------- trunk/monitor.c Modified: trunk/monitor.c =================================================================== --- trunk/monitor.c 2008-04-27 23:46:00 UTC (rev 4270) +++ trunk/monitor.c 2008-04-27 23:52:12 UTC (rev 4271) @@ -1283,6 +1283,19 @@ } #endif +#if defined(TARGET_I386) +static void do_inject_nmi(int cpu_index) +{ + CPUState *env; + + for (env = first_cpu; env != NULL; env = env->next_cpu) + if (env->cpu_index == cpu_index) { + cpu_interrupt(env, CPU_INTERRUPT_NMI); + break; + } +} +#endif + static term_cmd_t term_cmds[] = { { "help|?", "s?", do_help, "[cmd]", "show the help" }, @@ -1356,6 +1369,10 @@ "addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", }, { "pmemsave", "lis", do_physical_memory_save, "addr size file", "save to disk physical memory dump starting at 'addr' of size 'size'", }, +#if defined(TARGET_I386) + { "nmi", "i", do_inject_nmi, + "cpu", "inject an NMI on the given CPU", }, +#endif { NULL, NULL, }, };