[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 21/21] target/ppc: fix CPU hotplug when radix is enable
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 21/21] target/ppc: fix CPU hotplug when radix is enabled (TCG) |
Date: |
Mon, 17 Jul 2017 16:56:21 +1000 |
From: Cédric Le Goater <address@hidden>
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 <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
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 ae25fafab9..b325c2cce6 100644
--- a/target/ppc/translate_init.c
+++ b/target/ppc/translate_init.c
@@ -9011,8 +9011,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;
--
2.13.3
- [Qemu-ppc] [PULL 01/21] spapr: Remove unnecessary instance_size specifications from DRC subtypes, (continued)
- [Qemu-ppc] [PULL 01/21] spapr: Remove unnecessary instance_size specifications from DRC subtypes, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 09/21] spapr: Cleanups relating to DRC awaiting_release field, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 12/21] spapr: Implement DR-indicator for physical DRCs only, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 19/21] pseries: Allow HPT resizing with KVM, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 06/21] spapr: Simplify unplug path, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 02/21] spapr: migrate pending_events of spapr state, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 08/21] spapr: Refactor spapr_drc_detach(), David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 03/21] spapr: Minor cleanups to events handling, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 17/21] pseries: Enable HPT resizing for 2.10, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 13/21] spapr: fix potential memory leak in spapr_core_plug(), David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 21/21] target/ppc: fix CPU hotplug when radix is enabled (TCG),
David Gibson <=
- [Qemu-ppc] [PULL 10/21] spapr: Consolidate DRC state variables, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 14/21] ppc/pnv: Remove unused XICSState reference, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 18/21] pseries: Use smaller default hash page tables when guest can resize, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 11/21] spapr: Remove sPAPRConfigureConnectorState sub-structure, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 16/21] pseries: Implement HPT resizing, David Gibson, 2017/07/17
- [Qemu-ppc] [PULL 15/21] pseries: Stubs for HPT resizing, David Gibson, 2017/07/17
- Re: [Qemu-ppc] [PULL 00/21] ppc-for-2.10 queue 20170717, Peter Maydell, 2017/07/17