From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target/ppc: fix CPU hotplug when radix is enabled (TCG)
Date: Mon, 17 Jul 2017 11:05:05 +1000 [thread overview]
Message-ID: <20170717010505.GA4535@umbus> (raw)
In-Reply-To: <1500048838-16802-1-git-send-email-clg@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 1887 bytes --]
On Fri, Jul 14, 2017 at 06:13:58PM +0200, Cédric Le Goater wrote:
> But when a guest initializes radix mode, it issues a H_REGISTER_PROC_TBL
> to update the LPCR of all CPUs. Hot-plugged CPUs inherit from the same
> setting under KVM but not under TCG. So, Let's check for radix and update
> the default LPCR to keep new CPUs in sync.
>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Applied to ppc-for-2.10, thanks.
> ---
> target/ppc/translate_init.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
> index 8b9807665dd5..8776e9b0f8fa 100644
> --- a/target/ppc/translate_init.c
> +++ b/target/ppc/translate_init.c
> @@ -9014,8 +9014,16 @@ void cpu_ppc_set_papr(PowerPCCPU *cpu, PPCVirtualHypervisor *vhyp)
> /* By default we choose legacy mode and switch to new hash or radix
> * when a register process table hcall is made. So disable process
> * tables and guest translation shootdown by default
> + *
> + * Hot-plugged CPUs inherit from the guest radix setting under
> + * KVM but not under TCG. Update the default LPCR to keep new
> + * CPUs in sync when radix is enabled.
> */
> - lpcr->default_value &= ~(LPCR_UPRT | LPCR_GTSE);
> + if (ppc64_radix_guest(cpu)) {
> + lpcr->default_value |= LPCR_UPRT | LPCR_GTSE;
> + } else {
> + lpcr->default_value &= ~(LPCR_UPRT | LPCR_GTSE);
> + }
> lpcr->default_value |= LPCR_PDEE | LPCR_HDEE | LPCR_EEE | LPCR_DEE |
> LPCR_OEE;
> break;
--
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 --]
next prev parent reply other threads:[~2017-07-17 1:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 16:13 [Qemu-devel] [PATCH] target/ppc: fix CPU hotplug when radix is enabled (TCG) Cédric Le Goater
2017-07-17 1:05 ` David Gibson [this message]
2017-07-17 6:28 ` Suraj Jitindar Singh
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=20170717010505.GA4535@umbus \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=sjitindarsingh@gmail.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.