[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/99] target/ppc: always set PPC_MEM_TLBIE in pre 2
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 08/99] target/ppc: always set PPC_MEM_TLBIE in pre 2.8 migration hack |
Date: |
Mon, 23 Jul 2018 15:16:17 -0500 |
From: Greg Kurz <address@hidden>
The pseries-2.7 and older machine types require CPUPPCState::insns_flags
to be strictly equal between source and destination. This checking is
abusive and breaks migration of KVM guests when the host CPU models
are different, even if they are compatible enough to allow the guest
to run transparently. This buggy behaviour was fixed for pseries-2.8
and we added some hacks to allow backward migration of older machine
types. These hacks assume that the CPU belongs to the POWER8 family,
which was true for most KVM based setup we cared about at the time.
But now POWER9 systems are coming, and backward migration of pre 2.8
guests running in POWER8 architected mode from a POWER9 host to a
POWER8 host is broken:
qemu-system-ppc64: error while loading state for instance 0x0 of device
'cpu'
qemu-system-ppc64: load of migration failed: Invalid argument
This happens because POWER9 doesn't set PPC_MEM_TLBIE in insns_flags,
while POWER8 does. Let's force PPC_MEM_TLBIE in the migration hack to
fix the issue. This is an acceptable hack because these old machine
types only support CPU models that do set PPC_MEM_TLBIE.
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
(cherry picked from commit bce009645b9f1d59195518e35747c8ea30f985f7)
Signed-off-by: Michael Roth <address@hidden>
---
target/ppc/machine.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index 0634cdb295..cf44b97ced 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -200,6 +200,11 @@ static int cpu_pre_save(void *opaque)
;
cpu->mig_msr_mask = env->msr_mask & ~metamask;
cpu->mig_insns_flags = env->insns_flags & insns_compat_mask;
+ /* CPU models supported by old machines all have PPC_MEM_TLBIE,
+ * so we set it unconditionally to allow backward migration from
+ * a POWER9 host to a POWER8 host.
+ */
+ cpu->mig_insns_flags |= PPC_MEM_TLBIE;
cpu->mig_insns_flags2 = env->insns_flags2 & insns_compat_mask2;
cpu->mig_nb_BATs = env->nb_BATs;
}
--
2.17.1
- [Qemu-devel] [PATCH 84/99] target/arm: Implement FMOV (immediate) for fp16, (continued)
- [Qemu-devel] [PATCH 84/99] target/arm: Implement FMOV (immediate) for fp16, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 83/99] target/arm: Implement FCSEL for fp16, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 82/99] target/arm: Implement FCMP for fp16, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 85/99] target/arm: Fix sqrt_f16 exception raising, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 86/99] hw/isa/superio: Fix inconsistent use of Chardev->be, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 87/99] mux: fix ctrl-a b again, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 88/99] nfs: Remove processed options from QDict, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 89/99] replace functions which are only available in glib-2.24, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 90/99] vfio/pci: Default display option to "off", Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 91/99] migration/block-dirty-bitmap: fix dirty_bitmap_load, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 08/99] target/ppc: always set PPC_MEM_TLBIE in pre 2.8 migration hack,
Michael Roth <=
- [Qemu-devel] [PATCH 92/99] tcg: Reduce max TB opcode count, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 94/99] iscsi: Avoid potential for get_status overflow, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 93/99] nbd/server: Reject 0-length block status request, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 95/99] virtio-rng: process pending requests on DRIVER_OK, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 96/99] target/ppc: set is_jmp on ppc_tr_breakpoint_check, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 97/99] tap: fix memory leak on success to create a tap device, Michael Roth, 2018/07/23
- [Qemu-devel] [PATCH 98/99] qemu-img: avoid overflow of min_sparse parameter, Michael Roth, 2018/07/23