[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/24] spapr/rtas: fix reboot of a a SMP TCG guest
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 11/24] spapr/rtas: fix reboot of a a SMP TCG guest |
Date: |
Fri, 15 Dec 2017 16:54:22 +1100 |
From: Cédric Le Goater <address@hidden>
Just like for hot unplug CPUs, when a guest is rebooted, the secondary
CPUs can be awaken by the decrementer and start entering SLOF at the
same time the boot CPU is.
To be safe, let's disable on the secondaries all the exceptions which
can cause an exit while the CPU is in power-saving mode.
Based on previous work from Nikunj A Dadhania <address@hidden>
Signed-off-by: Cédric Le Goater <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_cpu_core.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 588f9b4571..1ea0e295dd 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -26,6 +26,7 @@ static void spapr_cpu_reset(void *opaque)
PowerPCCPU *cpu = opaque;
CPUState *cs = CPU(cpu);
CPUPPCState *env = &cpu->env;
+ PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
cpu_reset(cs);
@@ -35,6 +36,13 @@ static void spapr_cpu_reset(void *opaque)
cs->halted = 1;
env->spr[SPR_HIOR] = 0;
+
+ /* Disable Power-saving mode Exit Cause exceptions for the CPU.
+ * This can cause issues when rebooting the guest if a secondary
+ * is awaken */
+ if (cs != first_cpu) {
+ env->spr[SPR_LPCR] &= ~pcc->lpcr_pm;
+ }
}
static void spapr_cpu_destroy(PowerPCCPU *cpu)
--
2.14.3
- [Qemu-devel] [PULL 07/24] pcc: define the Power-saving mode Exit Cause Enable bits in PowerPCCPUClass, (continued)
- [Qemu-devel] [PULL 07/24] pcc: define the Power-saving mode Exit Cause Enable bits in PowerPCCPUClass, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 14/24] ppc/xics: assign of the CPU 'intc' pointer under the core, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 15/24] spapr: move the IRQ allocation routines under the machine, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 08/24] openpic: debug w/ info_report(), David Gibson, 2017/12/15
- [Qemu-devel] [PULL 18/24] spapr: replace numa_get_node() with lookup in pc-dimm list, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 22/24] spapr: Rename machine init functions for clarity, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 19/24] spapr: fix LSI interrupt specifiers in the device tree, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 24/24] spapr: don't initialize PATB entry if max-cpu-compat < power9, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 21/24] target/ppc: introduce the PPC_BIT() macro, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 23/24] spapr: Assume msi_nonbroken, David Gibson, 2017/12/15
- [Qemu-devel] [PULL 11/24] spapr/rtas: fix reboot of a a SMP TCG guest,
David Gibson <=
- [Qemu-devel] [PULL 17/24] spapr: introduce a spapr_qirq() helper, David Gibson, 2017/12/15
- Re: [Qemu-devel] [PULL 00/24] ppc-for-2.12 queue 20171215, Peter Maydell, 2017/12/15