All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Thomas Huth <thuth@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/5] cpu: Add NMI callback
Date: Mon, 31 Mar 2014 14:32:25 +0200	[thread overview]
Message-ID: <53396059.4030400@suse.de> (raw)
In-Reply-To: <1396011112-23559-2-git-send-email-aik@ozlabs.ru>

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 <aik@ozlabs.ru>
> ---
>   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);

  reply	other threads:[~2014-03-31 12:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28 12:51 [Qemu-devel] [PATCH v2 0/5] nmi: add interface Alexey Kardashevskiy
2014-03-28 12:51 ` [Qemu-devel] [PATCH v2 1/5] cpu: Add NMI callback Alexey Kardashevskiy
2014-03-31 12:32   ` Alexander Graf [this message]
2014-03-28 12:51 ` [Qemu-devel] [PATCH v2 2/5] target-i386: Implement nmi() callback Alexey Kardashevskiy
2014-03-31  2:55   ` Alexey Kardashevskiy
2014-03-31  3:20     ` Richard Henderson
2014-03-31 12:33   ` Alexander Graf
2014-03-28 12:51 ` [Qemu-devel] [PATCH v2 3/5] target-s390: " Alexey Kardashevskiy
2014-03-28 12:51 ` [Qemu-devel] [PATCH v2 4/5] target-ppc: " Alexey Kardashevskiy
2014-03-31 12:41   ` Alexander Graf
2014-03-28 12:51 ` [Qemu-devel] [PATCH v2 5/5] cpus: Enable nmi() callback use Alexey Kardashevskiy
2014-03-31 12:47   ` Alexander Graf

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=53396059.4030400@suse.de \
    --to=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.