qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: "Aravinda Prasad" <arawinda.p@gmail.com>,
	"Alexey Kardashevskiy" <aik@ozlabs.ru>,
	qemu-devel@nongnu.org, "Cédric Le Goater" <clg@fr.ibm.com>,
	"Ganesh Goudar" <ganeshgr@linux.ibm.com>,
	qemu-ppc@nongnu.org, "David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [PATCH 3/5] ppc/spapr: Add FWNMI machine check delivery warnings
Date: Tue, 17 Mar 2020 13:20:57 +0100	[thread overview]
Message-ID: <20200317132057.37296abc@bahia.lan> (raw)
In-Reply-To: <20200317050215.159334-4-npiggin@gmail.com>

On Tue, 17 Mar 2020 15:02:13 +1000
Nicholas Piggin <npiggin@gmail.com> wrote:

> Add some messages which explain problems and guest misbehaviour that
> may be difficult to diagnose in rare cases of machine checks.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>  hw/ppc/spapr_events.c | 4 ++++
>  hw/ppc/spapr_rtas.c   | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
> index 05337f0671..d35151eeb0 100644
> --- a/hw/ppc/spapr_events.c
> +++ b/hw/ppc/spapr_events.c
> @@ -807,6 +807,8 @@ static void spapr_mce_dispatch_elog(PowerPCCPU *cpu, bool recovered)
>      /* get rtas addr from fdt */
>      rtas_addr = spapr_get_rtas_addr();
>      if (!rtas_addr) {
> +        warn_report("FWNMI: Unable to deliver machine check to guest: "
> +                    "rtas_addr not found.");

Why a warning and not an error ?

Also maybe change the string to fit on one line ?

>          qemu_system_guest_panicked(NULL);
>          g_free(ext_elog);
>          return;
> @@ -848,6 +850,8 @@ void spapr_mce_req_event(PowerPCCPU *cpu, bool recovered)
>           * that CPU called "ibm,nmi-interlock")
>           */
>          if (spapr->fwnmi_machine_check_interlock == cpu->vcpu_id) {
> +            warn_report("FWNMI: Unable to deliver machine check to guest: "
> +                        "nested machine check.");

Ditto.

>              qemu_system_guest_panicked(NULL);
>              return;
>          }
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 29abe66d01..12cd09701c 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -462,6 +462,10 @@ static void rtas_ibm_nmi_interlock(PowerPCCPU *cpu,
>      }
>  
>      if (spapr->fwnmi_machine_check_addr == -1) {
> +        qemu_log_mask(LOG_GUEST_ERROR,
> +                      "FWNMI: ibm,nmi-interlock RTAS called with FWNMI not "
> +                       "registered.\n");

whitespace damage here   ^ best fixed by making the message a one liner.

> +
>          /* NMI register not called */
>          rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR);
>          return;



  reply	other threads:[~2020-03-17 12:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17  5:02 [PATCH 0/5] FWNMI follow up patches Nicholas Piggin
2020-03-17  5:02 ` [PATCH 1/5] ppc/spapr: KVM FWNMI should not be enabled until guest requests it Nicholas Piggin
2020-03-17 11:02   ` Greg Kurz
2020-03-19  2:27     ` Nicholas Piggin
2020-03-17  5:02 ` [PATCH 2/5] ppc/spapr: Improve FWNMI machine check delivery corner case comments Nicholas Piggin
2020-03-17 12:16   ` Greg Kurz
2020-03-17  5:02 ` [PATCH 3/5] ppc/spapr: Add FWNMI machine check delivery warnings Nicholas Piggin
2020-03-17 12:20   ` Greg Kurz [this message]
2020-03-19  2:28     ` Nicholas Piggin
2020-03-17  5:02 ` [PATCH 4/5] ppc/spapr: Don't kill the guest if a recovered FWNMI machine check delivery fails Nicholas Piggin
2020-03-17 16:57   ` Greg Kurz
2020-03-19  2:29     ` Nicholas Piggin
2020-03-17  5:02 ` [PATCH 5/5] target/ppc: Implement simple monitor mce injection Nicholas Piggin

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=20200317132057.37296abc@bahia.lan \
    --to=groug@kaod.org \
    --cc=aik@ozlabs.ru \
    --cc=arawinda.p@gmail.com \
    --cc=clg@fr.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=ganeshgr@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).