qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Aravinda Prasad <arawinda.p@gmail.com>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	qemu-devel@nongnu.org, Greg Kurz <groug@kaod.org>,
	Ganesh Goudar <ganeshgr@linux.ibm.com>,
	qemu-ppc@nongnu.org
Subject: Re: [PATCH v2 8/8] ppc/spapr: Ignore common "ibm,nmi-interlock" Linux bug
Date: Tue, 17 Mar 2020 10:32:06 +1100	[thread overview]
Message-ID: <20200316233206.GI20264@umbus.fritz.box> (raw)
In-Reply-To: <20200316142613.121089-9-npiggin@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]

On Tue, Mar 17, 2020 at 12:26:13AM +1000, Nicholas Piggin wrote:
> Linux kernels call "ibm,nmi-interlock" in their system reset handlers
> contrary to PAPR. Returning an error because the CPU does not hold the
> interlock here causes Linux to print warning messages. PowerVM returns
> success in this case, so do the same for now.
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Applied, thanks.

> ---
>  hw/ppc/spapr_rtas.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c
> index 521e6b0b72..9fb8c8632a 100644
> --- a/hw/ppc/spapr_rtas.c
> +++ b/hw/ppc/spapr_rtas.c
> @@ -461,8 +461,18 @@ static void rtas_ibm_nmi_interlock(PowerPCCPU *cpu,
>      }
>  
>      if (spapr->fwnmi_machine_check_interlock != cpu->vcpu_id) {
> -        /* The vCPU that hit the NMI should invoke "ibm,nmi-interlock" */
> -        rtas_st(rets, 0, RTAS_OUT_PARAM_ERROR);
> +        /*
> +	 * The vCPU that hit the NMI should invoke "ibm,nmi-interlock"
> +         * This should be PARAM_ERROR, but Linux calls "ibm,nmi-interlock"
> +	 * for system reset interrupts, despite them not being interlocked.
> +	 * PowerVM silently ignores this and returns success here. Returning
> +	 * failure causes Linux to print the error "FWNMI: nmi-interlock
> +	 * failed: -3", although no other apparent ill effects, this is a
> +	 * regression for the user when enabling FWNMI. So for now, match
> +	 * PowerVM. When most Linux clients are fixed, this could be
> +	 * changed.
> +	 */
> +        rtas_st(rets, 0, RTAS_OUT_SUCCESS);
>          return;
>      }
>  

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2020-03-16 23:36 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 14:26 [PATCH v2 0/8] FWNMI fixes / changes Nicholas Piggin
2020-03-16 14:26 ` [PATCH v2 1/8] ppc/spapr: Fix FWNMI machine check failure handling Nicholas Piggin
2020-03-16 15:27   ` Greg Kurz
2020-03-16 22:46   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 2/8] ppc/spapr: Change FWNMI names Nicholas Piggin
2020-03-16 17:15   ` Greg Kurz
2020-03-16 17:18   ` Mahesh J Salgaonkar
2020-03-16 17:25     ` Greg Kurz
2020-03-16 17:32   ` Cédric Le Goater
2020-03-16 22:46   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 3/8] ppc/spapr: Add FWNMI System Reset state Nicholas Piggin
2020-03-16 17:17   ` Greg Kurz
2020-03-16 17:29   ` Mahesh J Salgaonkar
2020-03-16 17:46   ` Cédric Le Goater
2020-03-16 22:47   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 4/8] ppc/spapr: Fix FWNMI machine check interrupt delivery Nicholas Piggin
2020-03-16 17:59   ` Cédric Le Goater
2020-03-16 23:19     ` Nicholas Piggin
2020-03-16 23:27       ` David Gibson
2020-03-16 14:26 ` [PATCH v2 5/8] ppc/spapr: Allow FWNMI on TCG Nicholas Piggin
2020-03-16 18:00   ` Cédric Le Goater
2020-03-16 18:01   ` Greg Kurz
2020-03-16 23:26     ` Nicholas Piggin
2020-03-17  3:56       ` David? Gibson
2020-03-16 14:26 ` [PATCH v2 6/8] target/ppc: allow ppc_cpu_do_system_reset to take an alternate vector Nicholas Piggin
2020-03-16 18:04   ` Greg Kurz
2020-03-16 18:15   ` Cédric Le Goater
2020-03-16 23:28     ` Nicholas Piggin
2020-03-16 23:34       ` David Gibson
2020-03-17 10:47         ` Cédric Le Goater
2020-03-16 23:28     ` David Gibson
2020-03-16 14:26 ` [PATCH v2 7/8] ppc/spapr: Implement FWNMI System Reset delivery Nicholas Piggin
2020-03-16 17:35   ` Mahesh J Salgaonkar
2020-03-16 17:52     ` Greg Kurz
2020-03-16 23:31       ` David Gibson
2020-03-16 23:30   ` David Gibson
2020-03-16 14:26 ` [PATCH v2 8/8] ppc/spapr: Ignore common "ibm, nmi-interlock" Linux bug Nicholas Piggin
2020-03-16 23:32   ` David Gibson [this message]

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=20200316233206.GI20264@umbus.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=aik@ozlabs.ru \
    --cc=arawinda.p@gmail.com \
    --cc=ganeshgr@linux.ibm.com \
    --cc=groug@kaod.org \
    --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).