From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTWGa-0003wR-TU for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:52:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTWGS-0000MJ-J0 for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:52:12 -0400 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:51476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTWGR-0000LQ-RW for qemu-devel@nongnu.org; Fri, 28 Mar 2014 08:52:04 -0400 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Mar 2014 22:51:59 +1000 From: Alexey Kardashevskiy Date: Fri, 28 Mar 2014 23:51:48 +1100 Message-Id: <1396011112-23559-2-git-send-email-aik@ozlabs.ru> In-Reply-To: <1396011112-23559-1-git-send-email-aik@ozlabs.ru> References: <1396011112-23559-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH v2 1/5] cpu: Add NMI callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Paolo Bonzini , qemu-ppc@nongnu.org, Alexander Graf , Thomas Huth This introduces an NMI (non maskable interrupt) callback per CPU class which QMP's "nmi" command may use to issue NMI on a CPU. Signed-off-by: Alexey Kardashevskiy --- hmp-commands.hx | 4 +--- include/qom/cpu.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index f3fc514..9633260 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -827,7 +827,6 @@ The values that can be specified here depend on the machine type, but are the same that can be specified in the @code{-boot} command line option. ETEXI -#if defined(TARGET_I386) || defined(TARGET_S390X) { .name = "nmi", .args_type = "", @@ -835,11 +834,10 @@ ETEXI .help = "inject an NMI on all guest's CPUs", .mhandler.cmd = hmp_inject_nmi, }, -#endif STEXI @item nmi @var{cpu} @findex nmi -Inject an NMI (x86) or RESTART (s390x) on the given CPU. +Inject an NMI on the given CPU. ETEXI diff --git a/include/qom/cpu.h b/include/qom/cpu.h index f99885a..8bb7018 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -103,6 +103,7 @@ typedef struct CPUClass { void (*parse_features)(CPUState *cpu, char *str, Error **errp); void (*reset)(CPUState *cpu); + int (*nmi)(CPUState *cs); int reset_dump_flags; bool (*has_work)(CPUState *cpu); void (*do_interrupt)(CPUState *cpu); -- 1.8.4.rc4