All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Lai Jiangshan <eag0628@gmail.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org,
	Avi Kivity <avi@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: add inject-nmi qmp command
Date: Mon, 4 Apr 2011 10:04:58 -0300	[thread overview]
Message-ID: <20110404100458.79467ef2@doriath> (raw)
In-Reply-To: <m3r59i439t.fsf@blackfin.pond.sub.org>

On Mon, 04 Apr 2011 14:19:58 +0200
Markus Armbruster <armbru@redhat.com> wrote:

> [Note cc: Anthony]
> 
> "Daniel P. Berrange" <berrange@redhat.com> writes:
> 
> > On Mon, Mar 07, 2011 at 05:46:28PM +0800, Lai Jiangshan wrote:
> >> From: Lai Jiangshan <laijs@cn.fujitsu.com>
> >> Date: Mon, 7 Mar 2011 17:05:15 +0800
> >> Subject: [PATCH 2/2] qemu,qmp: add inject-nmi qmp command
> >> 
> >> 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.
> >> 
> >> ---
> >>  hmp-commands.hx |    2 +-
> >>  monitor.c       |   18 +++++++++++++++++-
> >>  qmp-commands.hx |   29 +++++++++++++++++++++++++++++
> >>  3 files changed, 47 insertions(+), 2 deletions(-)
> >
> > Does anyone have any feedback on this addition, or are all new
> > QMP patch proposals blocked pending Anthony's QAPI work ?

No, we agreed on merging stuff against current QMP.

> That would be bad.  Anthony, what's holding this back?

I remember Anthony asked for errors descriptions.

> 
> > We'd like to support it in libvirt and thus want it to be
> > available in QMP, as well as HMP.
> >
> >> @@ -2566,6 +2566,22 @@ static void do_inject_nmi(Monitor *mon, const QDict *qdict)
> >>              break;
> >>          }
> >>  }
> >> +
> >> +static int do_inject_nmi(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(Monitor *mon, const QDict *qdict, QObject **ret_data)
> >> +{
> >> +    qerror_report(QERR_UNSUPPORTED);
> >> +    return -1;
> >> +}
> >>  #endif
> >>  
> >
> > Interesting that with HMP you need to specify a single CPU index, but
> > with QMP it is injecting to all CPUs at once. Is there any compelling
> > reason why we'd ever need the ability to only inject to a single CPU
> > from an app developer POV ?
> 
> Quoting my own executive summary on this issue:
> 
> * Real hardware's NMI button injects all CPUs.  This is the primary use
>   case.
> 
> * Lai said injecting a single CPU can be useful for debugging.  Was
>   deemed acceptable as secondary use case.
> 
>   Lai also pointed out that the human monitor's nmi command injects a
>   single CPU.  That was dismissed as irrelevant for QMP.
> 
> * No other use cases have been presented.
> 


WARNING: multiple messages have this Message-ID (diff)
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Lai Jiangshan <eag0628@gmail.com>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org,
	Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: add inject-nmi qmp command
Date: Mon, 4 Apr 2011 10:04:58 -0300	[thread overview]
Message-ID: <20110404100458.79467ef2@doriath> (raw)
In-Reply-To: <m3r59i439t.fsf@blackfin.pond.sub.org>

On Mon, 04 Apr 2011 14:19:58 +0200
Markus Armbruster <armbru@redhat.com> wrote:

> [Note cc: Anthony]
> 
> "Daniel P. Berrange" <berrange@redhat.com> writes:
> 
> > On Mon, Mar 07, 2011 at 05:46:28PM +0800, Lai Jiangshan wrote:
> >> From: Lai Jiangshan <laijs@cn.fujitsu.com>
> >> Date: Mon, 7 Mar 2011 17:05:15 +0800
> >> Subject: [PATCH 2/2] qemu,qmp: add inject-nmi qmp command
> >> 
> >> 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.
> >> 
> >> ---
> >>  hmp-commands.hx |    2 +-
> >>  monitor.c       |   18 +++++++++++++++++-
> >>  qmp-commands.hx |   29 +++++++++++++++++++++++++++++
> >>  3 files changed, 47 insertions(+), 2 deletions(-)
> >
> > Does anyone have any feedback on this addition, or are all new
> > QMP patch proposals blocked pending Anthony's QAPI work ?

No, we agreed on merging stuff against current QMP.

> That would be bad.  Anthony, what's holding this back?

I remember Anthony asked for errors descriptions.

> 
> > We'd like to support it in libvirt and thus want it to be
> > available in QMP, as well as HMP.
> >
> >> @@ -2566,6 +2566,22 @@ static void do_inject_nmi(Monitor *mon, const QDict *qdict)
> >>              break;
> >>          }
> >>  }
> >> +
> >> +static int do_inject_nmi(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(Monitor *mon, const QDict *qdict, QObject **ret_data)
> >> +{
> >> +    qerror_report(QERR_UNSUPPORTED);
> >> +    return -1;
> >> +}
> >>  #endif
> >>  
> >
> > Interesting that with HMP you need to specify a single CPU index, but
> > with QMP it is injecting to all CPUs at once. Is there any compelling
> > reason why we'd ever need the ability to only inject to a single CPU
> > from an app developer POV ?
> 
> Quoting my own executive summary on this issue:
> 
> * Real hardware's NMI button injects all CPUs.  This is the primary use
>   case.
> 
> * Lai said injecting a single CPU can be useful for debugging.  Was
>   deemed acceptable as secondary use case.
> 
>   Lai also pointed out that the human monitor's nmi command injects a
>   single CPU.  That was dismissed as irrelevant for QMP.
> 
> * No other use cases have been presented.
> 

  reply	other threads:[~2011-04-04 13:05 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07  9:43 [PATCH 0/2 V7] add inject-nmi qmp command Lai Jiangshan
2011-03-07  9:43 ` [Qemu-devel] " Lai Jiangshan
2011-03-07  9:45 ` [PATCH 1/2] qemu,qmp: QError: New QERR_UNSUPPORTED Lai Jiangshan
2011-03-07  9:45   ` [Qemu-devel] " Lai Jiangshan
2011-03-07  9:46 ` [PATCH 2/2 V7] qemu,qmp: add inject-nmi qmp command Lai Jiangshan
2011-03-07  9:46   ` [Qemu-devel] " Lai Jiangshan
2011-04-04 10:59   ` Daniel P. Berrange
2011-04-04 10:59     ` Daniel P. Berrange
2011-04-04 12:19     ` Markus Armbruster
2011-04-04 12:19       ` Markus Armbruster
2011-04-04 13:04       ` Luiz Capitulino [this message]
2011-04-04 13:04         ` Luiz Capitulino
2011-04-04 13:09       ` Anthony Liguori
2011-04-04 13:09         ` Anthony Liguori
2011-04-04 13:34         ` Luiz Capitulino
2011-04-04 13:34           ` Luiz Capitulino
2011-04-20  1:53         ` Lai Jiangshan
2011-04-20  1:53           ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Lai Jiangshan
2011-04-20  3:02           ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Lai Jiangshan
2011-04-20  3:02             ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Lai Jiangshan
2011-04-25 15:00           ` Luiz Capitulino
2011-04-25 15:00             ` [Qemu-devel] " Luiz Capitulino
2011-04-04 12:54     ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Avi Kivity
2011-04-04 12:54       ` Avi Kivity
2011-04-04 13:05       ` Anthony Liguori
2011-04-04 13:05         ` Anthony Liguori
2011-04-06 17:47         ` Luiz Capitulino
2011-04-06 17:47           ` Luiz Capitulino
2011-04-06 18:03           ` Anthony Liguori
2011-04-06 18:03             ` Anthony Liguori
2011-04-06 18:08             ` Luiz Capitulino
2011-04-06 18:08               ` Luiz Capitulino
2011-04-06 18:17               ` Jan Kiszka
2011-04-06 18:17                 ` Jan Kiszka
2011-04-06 19:00                 ` Luiz Capitulino
2011-04-06 19:00                   ` Luiz Capitulino
2011-04-06 19:27                   ` Peter Maydell
2011-04-06 19:27                     ` Peter Maydell
2011-04-06 19:34                     ` Anthony Liguori
2011-04-06 19:34                       ` Anthony Liguori
2011-04-07  7:29                       ` Jan Kiszka
2011-04-07  7:29                         ` Jan Kiszka
2011-04-07 18:10                       ` Peter Maydell
2011-04-07 18:10                         ` Peter Maydell
2011-04-07 18:32                         ` Anthony Liguori
2011-04-07 18:32                           ` Anthony Liguori
2011-04-07 18:51                           ` Gleb Natapov
2011-04-07 18:51                             ` Gleb Natapov
2011-04-07 19:04                             ` Blue Swirl
2011-04-07 19:04                               ` Blue Swirl
2011-04-07 19:17                               ` Gleb Natapov
2011-04-07 19:17                                 ` Gleb Natapov
2011-04-07 21:41                                 ` Anthony Liguori
2011-04-07 21:41                                   ` Anthony Liguori
2011-04-08  6:04                                   ` Gleb Natapov
2011-04-08  6:04                                     ` Gleb Natapov
2011-04-08 19:17                                     ` Blue Swirl
2011-04-08 19:17                                       ` Blue Swirl
2011-04-08 19:32                                       ` Anthony Liguori
2011-04-08 19:32                                         ` Anthony Liguori
2011-04-08 20:07                                         ` Blue Swirl
2011-04-08 20:07                                           ` Blue Swirl
2011-05-03 10:01                                       ` Jamie Lokier
2011-05-03 10:01                                         ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Jamie Lokier
2011-04-10  8:52                                   ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Avi Kivity
2011-04-10  8:52                                     ` Avi Kivity
2011-04-11  7:01                                     ` Markus Armbruster
2011-04-11  7:01                                       ` Markus Armbruster
2011-04-11 17:15                                       ` Blue Swirl
2011-04-11 17:15                                         ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Blue Swirl
2011-04-12  7:52                                         ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Avi Kivity
2011-04-12  7:52                                           ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Avi Kivity
2011-04-12 18:31                                           ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Blue Swirl
2011-04-12 18:31                                             ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Blue Swirl
2011-04-13 13:08                                             ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Luiz Capitulino
2011-04-13 13:08                                               ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Luiz Capitulino
2011-04-13 19:56                                               ` Blue Swirl
2011-04-13 19:56                                                 ` [Qemu-devel] " Blue Swirl
2011-04-14  6:41                                                 ` Markus Armbruster
2011-04-14  6:41                                                   ` [Qemu-devel] " Markus Armbruster
2011-04-14  9:55                                                 ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Daniel P. Berrange
2011-04-14  9:55                                                   ` [Qemu-devel] [PATCH 2/2 V7] qemu, qmp: " Daniel P. Berrange
2011-04-15 16:37                                                   ` Blue Swirl
2011-04-15 16:37                                                     ` [Qemu-devel] " Blue Swirl
2011-04-07 21:39                             ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Anthony Liguori
2011-04-08  5:54                               ` Gleb Natapov
2011-05-03  9:54                                 ` [PATCH 2/2 V7] qemu, qmp: " Jamie Lokier
2011-05-03  9:54                                   ` [Qemu-devel] " Jamie Lokier
2011-04-10  8:57                               ` [Qemu-devel] [PATCH 2/2 V7] qemu,qmp: " Avi Kivity
2011-04-10  8:57                                 ` Avi Kivity
2011-04-20  6:19               ` [RFC PATCH 0/3 V8] QAPI: " Lai Jiangshan
2011-04-20  6:19                 ` [Qemu-devel] " Lai Jiangshan
2011-04-21  3:23                 ` Lai Jiangshan
2011-04-21  3:23                   ` [Qemu-devel] " Lai Jiangshan
2011-04-26 13:26                   ` Luiz Capitulino
2011-04-26 13:26                     ` [Qemu-devel] " Luiz Capitulino
2011-04-26 13:29                     ` Anthony Liguori
2011-04-26 13:29                       ` Anthony Liguori
2011-04-27  1:54                       ` Lai Jiangshan
2011-04-27  1:54                         ` Lai Jiangshan
2011-04-27 14:33                         ` Luiz Capitulino
2011-04-27 14:33                           ` Luiz Capitulino
2011-04-28  3:35                           ` [PATCH 0/2 V9] hmp,qmp: add inject-nmi Lai Jiangshan
2011-04-28  3:35                             ` [Qemu-devel] " Lai Jiangshan
2011-04-29 22:24                             ` Luiz Capitulino
2011-04-29 22:24                               ` [Qemu-devel] " Luiz Capitulino
2011-04-28  3:35                           ` [PATCH 1/2 V9] qemu,qmp: QError: New QERR_UNSUPPORTED Lai Jiangshan
2011-04-28  3:35                             ` [Qemu-devel] [PATCH 1/2 V9] qemu, qmp: " Lai Jiangshan
2011-04-28  3:35                           ` [PATCH 2/2 V9] qmp,inject-nmi: convert do_inject_nmi() to QObject Lai Jiangshan
2011-04-28  3:35                             ` [Qemu-devel] [PATCH 2/2 V9] qmp, inject-nmi: " Lai Jiangshan
2011-04-25 17:07                 ` [Qemu-devel] [RFC PATCH 0/3 V8] QAPI: add inject-nmi qmp command Michael Roth
2011-04-25 17:07                   ` Michael Roth
2011-04-20  6:19               ` [RFC PATCH 1/3 V8] QError: Introduce QERR_UNSUPPORTED Lai Jiangshan
2011-04-20  6:19                 ` [Qemu-devel] " Lai Jiangshan
2011-04-20  6:19               ` [RFC PATCH 2/3 V8] qapi,nmi: add inject-nmi qmp command Lai Jiangshan
2011-04-20  6:19                 ` [Qemu-devel] [RFC PATCH 2/3 V8] qapi, nmi: " Lai Jiangshan
2011-04-20  6:19               ` [RFC PATCH 3/3 V8] qapi-hmp: Convert HMP nmi to use QMP Lai Jiangshan
2011-04-20  6:19                 ` [Qemu-devel] " Lai Jiangshan

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=20110404100458.79467ef2@doriath \
    --to=lcapitulino@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eag0628@gmail.com \
    --cc=kvm@vger.kernel.org \
    --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 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.