aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-04-10 16:58:19 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-04-10 16:58:19 +0100
commit69550301ecb3f0e5b9e2cc502aecb9411cdc5816 (patch)
treeeffb4212a9d818a7306f29714eec5715abb6bb24 /target
parentf41ee66df0ceef0002644d08a61a6a929674898d (diff)
parent6b3913e0858488ef3358c1683605d6894a6cadb0 (diff)
downloadqemu-69550301ecb3f0e5b9e2cc502aecb9411cdc5816.zip
qemu-69550301ecb3f0e5b9e2cc502aecb9411cdc5816.tar.gz
qemu-69550301ecb3f0e5b9e2cc502aecb9411cdc5816.tar.bz2
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.12-20180410' into staging
ppc patch queue 2018-04-10 Here's a rather late pull request with a handful of fixes for 2.12. These have been blocked for some time, because I wasn't able to complete my usual test set due to the SCSI problem fixed in 37c5174 "scsi-disk: Don't enlarge min_io_size to max_io_size". Since we're in hard freeze, these are all bugfixes. Most are also regressions, although in one case it's only a "regression" because a longstanding bug has been exposed by a new machine type (sam460ex) in the testcases. There are also a couple of sam460ex fixes that aren't regressions since the board didn't exist before. On the flipside though, they're low risk because they only touch board specific code for a board that doesn't exist in any released version. # gpg: Signature made Tue 10 Apr 2018 08:13:52 BST # gpg: using RSA key 6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.12-20180410: roms/u-boot-sam460ex: Change to qemu git mirror and update sam460ex: Fix timer frequency and clock multipliers tests/boot-serial: Test the sam460ex board spapr: Initialize reserved areas list in FDT in H_CAS handler target/ppc: Fix backwards migration of msr_mask hw/misc/macio: Fix crash when listing device properties of macio device target/ppc: Initialize lazy_tlb_flush correctly Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-rw-r--r--target/ppc/machine.c10
-rw-r--r--target/ppc/translate.c7
2 files changed, 12 insertions, 5 deletions
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index e475206..0634cdb 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -190,7 +190,15 @@ static int cpu_pre_save(void *opaque)
/* Hacks for migration compatibility between 2.6, 2.7 & 2.8 */
if (cpu->pre_2_8_migration) {
- cpu->mig_msr_mask = env->msr_mask;
+ /* Mask out bits that got added to msr_mask since the versions
+ * which stupidly included it in the migration stream. */
+ target_ulong metamask = 0
+#if defined(TARGET_PPC64)
+ | (1ULL << MSR_TS0)
+ | (1ULL << MSR_TS1)
+#endif
+ ;
+ cpu->mig_msr_mask = env->msr_mask & ~metamask;
cpu->mig_insns_flags = env->insns_flags & insns_compat_mask;
cpu->mig_insns_flags2 = env->insns_flags2 & insns_compat_mask2;
cpu->mig_nb_BATs = env->nb_BATs;
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 218665b..3457d29 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -7237,10 +7237,9 @@ static int ppc_tr_init_disas_context(DisasContextBase *dcbase,
ctx->sf_mode = msr_is_64bit(env, env->msr);
ctx->has_cfar = !!(env->flags & POWERPC_FLAG_CFAR);
#endif
- if (env->mmu_model == POWERPC_MMU_32B ||
- env->mmu_model == POWERPC_MMU_601 ||
- (env->mmu_model & POWERPC_MMU_64B))
- ctx->lazy_tlb_flush = true;
+ ctx->lazy_tlb_flush = env->mmu_model == POWERPC_MMU_32B
+ || env->mmu_model == POWERPC_MMU_601
+ || (env->mmu_model & POWERPC_MMU_64B);
ctx->fpu_enabled = !!msr_fp;
if ((env->flags & POWERPC_FLAG_SPE) && msr_spe)