qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: armbru@redhat.com, aliguori@us.ibm.com,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/5] QMP: add inject-nmi qmp command
Date: Mon, 6 Jun 2011 11:17:25 -0300	[thread overview]
Message-ID: <20110606111725.663edcb1@doriath> (raw)
In-Reply-To: <BANLkTi=pVLzNSJ4k+Se_KGV8pJ=KBiDfFQ@mail.gmail.com>

On Sat, 4 Jun 2011 11:34:17 +0300
Blue Swirl <blauwirbel@gmail.com> wrote:

> On Wed, Jun 1, 2011 at 6:54 PM, Luiz Capitulino <lcapitulino@redhat.com> wrote:
> > From: Lai Jiangshan <laijs@cn.fujitsu.com>
> >
> > inject-nmi command injects an NMI on all CPUs of guest.
> > It is only supported for x86 guest currently, it will
> > returns "Unsupported" error for non-x86 guest.
> 
> Please rename the command to 'x-inject-nmi' to point out that it will
> be replaced by a generic method later.

Won't the generic interface be called 'inject'? In that case calling this
command 'inject-nmi' makes sense as it's exactly what the command does and
in the future it can be written in terms of the new 'inject' command.

> 
> > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> > ---
> >  monitor.c       |   17 +++++++++++++++++
> >  qmp-commands.hx |   27 +++++++++++++++++++++++++++
> >  2 files changed, 44 insertions(+), 0 deletions(-)
> >
> > diff --git a/monitor.c b/monitor.c
> > index f63cce0..81d3c9b 100644
> > --- a/monitor.c
> > +++ b/monitor.c
> > @@ -2555,6 +2555,23 @@ static void do_inject_nmi(Monitor *mon, const QDict *qdict)
> >             break;
> >         }
> >  }
> > +
> > +static int do_inject_nmi_all(Monitor *mon, const QDict *qdict, QObject **ret_data)
> > +{
> > +    CPUState *env;
> > +
> > +    for (env = first_cpu; env != NULL; env = env->next_cpu) {
> > +        cpu_interrupt(env, CPU_INTERRUPT_NMI);
> > +    }
> > +
> > +    return 0;
> > +}
> > +#else
> > +static int do_inject_nmi_all(Monitor *mon, const QDict *qdict, QObject **ret_data)
> > +{
> > +    qerror_report(QERR_UNSUPPORTED);
> > +    return -1;
> > +}
> >  #endif
> >
> >  static void do_info_status_print(Monitor *mon, const QObject *data)
> > diff --git a/qmp-commands.hx b/qmp-commands.hx
> > index a9f109a..ae08b7a 100644
> > --- a/qmp-commands.hx
> > +++ b/qmp-commands.hx
> > @@ -430,6 +430,33 @@ Example:
> >  EQMP
> >
> >     {
> > +        .name       = "inject-nmi",
> > +        .args_type  = "",
> > +        .params     = "",
> > +        .help       = "",
> > +        .user_print = monitor_user_noop,
> > +        .mhandler.cmd_new = do_inject_nmi_all,
> > +    },
> > +
> > +SQMP
> > +inject-nmi
> > +----------
> > +
> > +Inject an NMI on guest's CPUs.
> > +
> > +Arguments: None.
> > +
> > +Example:
> > +
> > +-> { "execute": "inject-nmi" }
> > +<- { "return": {} }
> > +
> > +Note: inject-nmi is only supported for x86 guest currently, it will
> > +      returns "Unsupported" error for non-x86 guest.
> > +
> > +EQMP
> > +
> > +    {
> >         .name       = "migrate",
> >         .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
> >         .params     = "[-d] [-b] [-i] uri",
> > --
> > 1.7.4.4
> >
> >
> >
> 

  reply	other threads:[~2011-06-06 14:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 15:54 [Qemu-devel] [PULL 0/5]: Monitor queue Luiz Capitulino
2011-06-01 15:54 ` [Qemu-devel] [PATCH 1/5] QMP: QError: New QERR_UNSUPPORTED Luiz Capitulino
2011-06-01 15:54 ` [Qemu-devel] [PATCH 2/5] QMP: add inject-nmi qmp command Luiz Capitulino
2011-06-04  8:34   ` Blue Swirl
2011-06-06 14:17     ` Luiz Capitulino [this message]
2011-06-12 21:22       ` Blue Swirl
2011-06-01 15:54 ` [Qemu-devel] [PATCH 3/5] HMP: Use QMP inject nmi implementation Luiz Capitulino
2011-06-01 15:54 ` [Qemu-devel] [PATCH 4/5] QMP: add get_events(wait=True) option Luiz Capitulino
2011-06-01 15:54 ` [Qemu-devel] [PATCH 5/5] QMP: add server mode to QEMUMonitorProtocol Luiz Capitulino
2011-06-02  2:19   ` Brad Hards
2011-06-02  9:02     ` Daniel P. Berrange
2011-06-09 12:40 ` [Qemu-devel] [PULL 0/5]: Monitor queue Anthony Liguori

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=20110606111725.663edcb1@doriath \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).