All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Nicholas Piggin <npiggin@gmail.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH] spapr: propagate LPCR to hot-plugged CPUs
Date: Tue, 25 May 2021 17:12:34 +0200	[thread overview]
Message-ID: <20210525171234.513f2e83@bahia.lan> (raw)
In-Reply-To: <20210524114132.572659-1-clg@kaod.org>

On Mon, 24 May 2021 13:41:32 +0200
Cédric Le Goater <clg@kaod.org> wrote:

> Distros have started using the 'scv' instructions (glibc 2.33) which
> relies on the LPCR AIL bits. Unfortunately, the LPCR of hot-plugged
> CPUs is not synchronized with the rest of machine and it breaks the
> guest OS.
> 
> Fix that by using the first CPU to set the LPCR value of all hot-plugged
> CPUs.
> 
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---

LGTM

Reviewed-by: Greg Kurz <groug@kaod.org>

>  hw/ppc/spapr.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index c23bcc449071..e463c2570c7a 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -3890,6 +3890,8 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev)
>          for (i = 0; i < cc->nr_threads; i++) {
>              ppc_set_compat(core->threads[i], POWERPC_CPU(first_cpu)->compat_pvr,
>                             &error_abort);
> +            ppc_store_lpcr(core->threads[i],
> +                           POWERPC_CPU(first_cpu)->env.spr[SPR_LPCR]);
>          }
>      }
>  



  reply	other threads:[~2021-05-25 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 11:41 [PATCH] spapr: propagate LPCR to hot-plugged CPUs Cédric Le Goater
2021-05-25 15:12 ` Greg Kurz [this message]
2021-05-27  4:26 ` David Gibson

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=20210525171234.513f2e83@bahia.lan \
    --to=groug@kaod.org \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --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 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.