From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUbOE-0004Kr-7j for qemu-devel@nongnu.org; Mon, 31 Mar 2014 08:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUbO7-0000PU-V7 for qemu-devel@nongnu.org; Mon, 31 Mar 2014 08:32:34 -0400 Message-ID: <53396059.4030400@suse.de> Date: Mon, 31 Mar 2014 14:32:25 +0200 From: Alexander Graf MIME-Version: 1.0 References: <1396011112-23559-1-git-send-email-aik@ozlabs.ru> <1396011112-23559-2-git-send-email-aik@ozlabs.ru> In-Reply-To: <1396011112-23559-2-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/5] cpu: Add NMI callback List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Paolo Bonzini , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Thomas Huth 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 > --- > 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", This is not true anymore with your patch. Also, does NMI injection only get exposed through HMP, not a specific QMP path? Alex > .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);