All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-s390x@nongnu.org,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	"Thomas Huth" <thuth@redhat.com>,
	qemu-ppc@nongnu.org, "Corey Minyard" <minyard@acm.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: [PATCH v3 0/7] hw/nmi: Disconnect of vCPU and disentangle Monitor code
Date: Tue, 11 Aug 2026 12:54:18 +0200	[thread overview]
Message-ID: <20260811105425.7429-1-philmd@oss.qualcomm.com> (raw)

- Have s390x always deliver NMI to the first CPU.
- Remove the @cpu_index / @errp arguments from handler.
- Rename API as nmi_trigger() (since not monitor specific).
- Only deliver NMI once

Rationale described by Peter in v1 [*]:

> The current hw/core/nmi.c code is a bit odd because it's partly
> working with a cpu_index and partly not: the code passes cpu_index
> around, but in practice for the QMP command the user can't set
> which CPU to operate on, and for everything except s390 the
> implementation doesn't care anyway. My impression from the IRC
> discussion is that it's not really necessary for the S390 that
> the monitor user be able to specify which CPU to NMI (and in any
> case you can only do that from the HMP command, not the QMP
> command, AIUI), so getting rid of that weird inconsistency makes
> sense to me: and that's what this patchset is doing.

[*] https://lore.kernel.org/qemu-devel/CAFEAcA_0qUFW0MewHC+v+pSOisE-kQDt9Wv4F3RafEkyQ0DGJA@mail.gmail.com/:

Philippe Mathieu-Daudé (7):
  hw/nmi: Use object_child_foreach_recursive() in nmi_children()
  hw/s390x/virtio-ccw: Always deliver NMI to first CPU
  hw/nmi: Remove @cpu_index argument from
    NMIClass::nmi_monitor_handler()
  hw/nmi: Remove @cpu_index argument from nmi_trigger()
  hw/nmi: Rename nmi_monitor_handler() -> deliver_nmi()
  hw/nmi: Remove unused @errp argument from deliver_nmi()
  hw/nmi: Deliver NMI only once

 qapi/run-state.json        |  6 +++--
 include/hw/core/nmi.h      | 32 +++++++++++++++++++++++++--
 hw/core/nmi.c              | 45 ++++++++++----------------------------
 hw/hppa/machine.c          |  4 ++--
 hw/i386/x86.c              |  4 ++--
 hw/intc/m68k_irqc.c        |  4 ++--
 hw/ipmi/ipmi.c             |  3 +--
 hw/m68k/q800-glue.c        |  4 ++--
 hw/misc/macio/gpio.c       |  4 ++--
 hw/ppc/pnv.c               |  4 ++--
 hw/ppc/spapr.c             |  4 ++--
 hw/s390x/s390-virtio-ccw.c |  8 +++----
 hw/watchdog/watchdog.c     |  2 +-
 system/cpus.c              |  2 +-
 hmp-commands.hx            |  2 +-
 15 files changed, 66 insertions(+), 62 deletions(-)

-- 
2.53.0



             reply	other threads:[~2026-08-11 10:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 10:54 Philippe Mathieu-Daudé [this message]
2026-08-11 10:54 ` [PATCH v3 1/7] hw/nmi: Use object_child_foreach_recursive() in nmi_children() Philippe Mathieu-Daudé
2026-08-11 10:54 ` [PATCH v3 2/7] hw/s390x/virtio-ccw: Always deliver NMI to first CPU Philippe Mathieu-Daudé
2026-08-11 10:54 ` [PATCH v3 3/7] hw/nmi: Remove @cpu_index argument from NMIClass::nmi_monitor_handler() Philippe Mathieu-Daudé
2026-08-11 13:21   ` Peter Maydell
2026-08-11 10:54 ` [PATCH v3 4/7] hw/nmi: Remove @cpu_index argument from nmi_trigger() Philippe Mathieu-Daudé
2026-08-11 11:10   ` Marc-André Lureau
2026-08-11 13:55     ` Philippe Mathieu-Daudé
2026-08-11 10:54 ` [PATCH v3 5/7] hw/nmi: Rename nmi_monitor_handler() -> deliver_nmi() Philippe Mathieu-Daudé
2026-08-11 10:54 ` [PATCH v3 6/7] hw/nmi: Remove unused @errp argument from deliver_nmi() Philippe Mathieu-Daudé
2026-08-11 13:24   ` Peter Maydell
2026-08-11 10:54 ` [PATCH v3 7/7] hw/nmi: Deliver NMI only once Philippe Mathieu-Daudé
2026-08-11 13:34   ` Peter Maydell
2026-08-11 14:09     ` Philippe Mathieu-Daudé

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=20260811105425.7429-1-philmd@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=minyard@acm.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@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.