[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v2 1/5] cpu: Add NMI callback

From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH v2 1/5] cpu: Add NMI callback
Date: Mon, 31 Mar 2014 14:32:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130910 Thunderbird/17.0.9

On 03/28/2014 01:51 PM, Alexey Kardashevskiy wrote:
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 <address@hidden>
  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.
-#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",

This is not true anymore with your patch.

Also, does NMI injection only get exposed through HMP, not a specific QMP path?


          .mhandler.cmd = hmp_inject_nmi,
  @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);

reply via email to

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