[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 48/49] spapr: Set compatibility mode before the rest of
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 48/49] spapr: Set compatibility mode before the rest of spapr_cpu_reset() |
Date: |
Fri, 27 Apr 2018 19:21:25 +1000 |
Although the order doesn't really matter at the moment, it's possible
other initializastions could depend on the compatiblity mode, so make sure
we set it first in spapr_cpu_reset().
While we're at it drop the test against first_cpu. Setting the compat mode
to the value it already has is redundant, but harmless, so we might as well
make a small simplification to the code.
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
---
hw/ppc/spapr_cpu_core.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 94afeb399e..01dbc69424 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -31,6 +31,11 @@ static void spapr_cpu_reset(void *opaque)
cpu_reset(cs);
+ /* Set compatibility mode to match the boot CPU, which was either set
+ * by the machine reset code or by CAS. This should never fail.
+ */
+ ppc_set_compat(cpu, POWERPC_CPU(first_cpu)->compat_pvr, &error_abort);
+
/* All CPUs start halted. CPU0 is unhalted from the machine level
* reset code and the rest are explicitly started up by the guest
* using an RTAS call */
@@ -45,12 +50,6 @@ static void spapr_cpu_reset(void *opaque)
env->spr[SPR_LPCR] &= ~pcc->lpcr_pm;
}
- /* Set compatibility mode to match the boot CPU, which was either set
- * by the machine reset code or by CAS. This should never fail.
- */
- if (cs != first_cpu) {
- ppc_set_compat(cpu, POWERPC_CPU(first_cpu)->compat_pvr, &error_abort);
- }
}
static void spapr_cpu_destroy(PowerPCCPU *cpu)
--
2.14.3
- [Qemu-ppc] [PULL 29/49] Revert "spapr: Don't allow memory hotplug to memory less nodes", (continued)
- [Qemu-ppc] [PULL 29/49] Revert "spapr: Don't allow memory hotplug to memory less nodes", David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 26/49] Make qemu_mempath_getpagesize() accept NULL, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 44/49] spapr: Add ibm, max-associativity-domains property, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 43/49] target/ppc: Fold slb_nr into PPCHash64Options, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 45/49] ppc: e500: switch E500 based machines to full machine definition, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 32/49] target/ppc: Simplify cpu valid check in ppc_cpu_realize, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 35/49] target/ppc: Remove fallback 64k pagesize information, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 36/49] target/ppc: Move page size setup to helper function, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 49/49] Clear mem_path if we fall back to anonymous RAM allocation, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 46/49] spapr: Support ibm, dynamic-memory-v2 property, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 48/49] spapr: Set compatibility mode before the rest of spapr_cpu_reset(),
David Gibson <=
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/49] ppc-for-2.13 queue 20180427, no-reply, 2018/04/27
- Re: [Qemu-ppc] [PULL 00/49] ppc-for-2.13 queue 20180427, Peter Maydell, 2018/04/27