Skip to contentSkip to conversation

spapr: fix entry point for secondary CPUs

PATCH In review Cédric Le Goater 2 participants 3 messages Apr 25, 2018 – Apr 26, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spapr: fix entry point for secondary CPUs

Secondary CPUs do not start at SPAPR_ENTRY_POINT but at an address given by the guest OS.

Fixes commit c79128c14c20 ("spapr: Make a helper to set up cpu entry point state")

---
 hw/ppc/spapr_cpu_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/ppc/spapr_cpu_core.c +1 -1
index 326b35d6ed23..f3e9b879b251 100644
@@ -76,7 +76,7 @@ void spapr_cpu_set_entry_state(PowerPCCPU *cpu, target_ulong nip, target_ulong r
     PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
     CPUPPCState *env = &cpu->env;
 
-    env->nip = SPAPR_ENTRY_POINT;
+    env->nip = nip;
     env->gpr[3] = r3;
     CPU(cpu)->halted = 0;
     /* Enable Power-saving mode Exit Cause exceptions */
Signature · 1 line
2.13.6
#1 lore raw
Quoted 7 lines · Cédric Le Goater

Secondary CPUs do not start at SPAPR_ENTRY_POINT but at an address given by the guest OS.

Fixes commit c79128c14c20 ("spapr: Make a helper to set up cpu entry point state")

Oops. Since I haven't send that patch upstream yet, I've folded this fix in rather than including it as a separate patch.

Note that ppc-for-<whatever> are rebasing trees, so commit ids in there aren't stable.

Signature · 4 lines
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
#2 lore raw
Quoted 11 lines · David Gibson
Quoted 7 lines · Cédric Le Goater

Secondary CPUs do not start at SPAPR_ENTRY_POINT but at an address given by the guest OS.

Fixes commit c79128c14c20 ("spapr: Make a helper to set up cpu entry point state")

Oops. Since I haven't send that patch upstream yet, I've folded this fix in rather than including it as a separate patch.

OK.

Quoted 2 lines

Note that ppc-for-<whatever> are rebasing trees, so commit ids in there aren't stable.

yes. I usually track these at the beginning of the dev cycle. So I have rebased all my QEMU development trees on ppc-for-2.13 yesterday and found a couple of issues in TCG hot(un)plug, the entry point and the radix LPCR setting.

C.