All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>,
	"Alexander Graf" <agraf@suse.de>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-ppc@nongnu.org, "Alex Bligh" <alex@alex.org.uk>,
	"Cornelia Huck" <cornelia.huck@de.ibm.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v3 1/4] cpus: Define NMI callback
Date: Wed, 11 Jun 2014 09:10:36 -0400	[thread overview]
Message-ID: <20140611091036.39defd45@redhat.com> (raw)
In-Reply-To: <53973277.4090500@redhat.com>

On Tue, 10 Jun 2014 18:29:43 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> Il 10/06/2014 16:48, Luiz Capitulino ha scritto:
> > > The s390 restart interrupt is a per-vcpu interrupt, which we really
> > > don't want to inject on _all_ vcpus. OTOH, we want to inject that
> > > interrupt on any vcpu - we don't care which one it is. So I'd really
> > > like an "inject nmi on default cpu" option.
> >
> > We could define a default CPU for the command. What isn't going to work
> > is to use the human monitor's "current CPU" concept (set with the cpu
> > command).
> 
> It isn't going to work, but to me it seems like a bug.  Why was the NMI 
> command even converted to QAPI if it cannot work?  

It works by sending the NMI to all CPUs. That's the solution we found to
avoid creating a dependency between a QMP command and HMP w/o breaking the
nmi command compatibility. If this is not right, I'd have expected people
to complain as I know this has been used for quite some time to generate
crash dumps.

All I'm suggesting is to add a new QMP command, say inject-nmi-cpu, which
takes a CPU index as an argument. This solves any concern on compatibility
Alex talked about, gives a chance to design the command the way we like and
doesn't create a dependency between a QMP command and HMP (which would be
a design flaw).

The QAPI had two main motivations. Automatically generate open-coded json
present in all QMP commands and decouple QMP from HMP, as the two were
tight coupled in the past. Having the two decoupled is very important so
that QMP doesn't depend on HMP's global garbage (good for concurrency and
for allowing to have a different HMP on top of QMP). Also, we were planning
having a QMP-only socket, session support and other features. Being able to
build QMP w/o building the monitor would be a good milestone.

Making a QMP command depend on HMP is step back for all this planning and
a big de-motivator for all the hard work we put on separating the two.

Again, I wonder if I'm missing something, but I see it as a very simple change
to add a new command. Note that we can do whatever we want in hmp_inject_nmi(),
we can use the new command with whatever semantics we like.

  parent reply	other threads:[~2014-06-11 13:11 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04  8:08 [Qemu-devel] [PATCH v3 0/4] cpus: Add generic NMI support Alexey Kardashevskiy
2014-06-04  8:08 ` [Qemu-devel] [PATCH v3 1/4] cpus: Define NMI callback Alexey Kardashevskiy
2014-06-10 13:39   ` Luiz Capitulino
2014-06-10 14:41     ` Cornelia Huck
2014-06-10 14:48       ` Luiz Capitulino
2014-06-10 16:29         ` Paolo Bonzini
2014-06-10 18:09           ` Alexander Graf
2014-06-11  0:12             ` Alexey Kardashevskiy
2014-06-11  0:21               ` Alexander Graf
2014-06-11  0:23             ` Peter Maydell
2014-06-11  0:28               ` Alexander Graf
2014-06-11  4:59                 ` Paolo Bonzini
2014-06-11  8:01                   ` Alexander Graf
2014-06-11  8:27                     ` Paolo Bonzini
2014-06-11  8:29                       ` Alexander Graf
2014-06-11  8:37                         ` Paolo Bonzini
2014-06-11  8:42                           ` Alexander Graf
2014-06-11 10:47                             ` Paolo Bonzini
2014-06-11 10:59                               ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2014-06-11 12:04                               ` [Qemu-devel] " Alexander Graf
2014-06-11  9:04                 ` Alexey Kardashevskiy
2014-06-11  9:19                   ` Alexander Graf
2014-06-11 13:10           ` Luiz Capitulino [this message]
2014-06-11 13:36             ` Cornelia Huck
2014-06-11 13:42               ` Luiz Capitulino
2014-06-11  6:50       ` Alexey Kardashevskiy
2014-06-11  7:57         ` Paolo Bonzini
2014-06-11  8:38         ` Cornelia Huck
2014-06-11  9:18           ` Cornelia Huck
2014-06-10 15:13     ` Eric Blake
2014-06-10 15:40     ` Alexey Kardashevskiy
2014-06-11 12:50       ` Luiz Capitulino
2014-06-04  8:08 ` [Qemu-devel] [PATCH v3 2/4] target-s390x: Migrate to new nmi() CPU callback Alexey Kardashevskiy
2014-06-04  8:08 ` [Qemu-devel] [PATCH v3 3/4] target-i386: " Alexey Kardashevskiy
2014-06-04  8:08 ` [Qemu-devel] [PATCH v3 4/4] target-ppc: Add support for " Alexey Kardashevskiy
2014-06-04  9:11 ` [Qemu-devel] [PATCH v3 0/4] cpus: Add generic NMI support Paolo Bonzini
2014-06-04  9:16 ` Peter Maydell
2014-06-04  9:30   ` Alexey Kardashevskiy
2014-06-04  9:33     ` Peter Maydell
2014-06-04  9:38       ` Alexander Graf
2014-06-04  9:39       ` Alexey Kardashevskiy
2014-06-04  9:39       ` Paolo Bonzini
2014-06-04  9:47         ` Peter Maydell
2014-06-04  9:50           ` Alexander Graf
2014-06-04 10:44             ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2014-06-04 10:51               ` Cornelia Huck
2014-06-04 11:34             ` [Qemu-devel] " Alexey Kardashevskiy

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=20140611091036.39defd45@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=alex@alex.org.uk \
    --cc=armbru@redhat.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.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.