diff options
author | Laurent Vivier <lvivier@redhat.com> | 2017-11-28 18:43:10 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-11-30 13:57:51 +1100 |
commit | 0c86b2df78fecf1d0b5017e1bab6b2607556c5ed (patch) | |
tree | 5f85521c817f4fc10c53772e4f6cc106e8415d37 /hw/ppc/spapr.c | |
parent | c11d61271b9e6e7a1f0479ef1ca8fb55fa457a62 (diff) | |
download | qemu-0c86b2df78fecf1d0b5017e1bab6b2607556c5ed.zip qemu-0c86b2df78fecf1d0b5017e1bab6b2607556c5ed.tar.gz qemu-0c86b2df78fecf1d0b5017e1bab6b2607556c5ed.tar.bz2 |
pseries: fix TCG migration
Migration of pseries is broken with TCG because
QEMU tries to restore KVM MMU state unconditionally.
The result is a SIGSEGV in kvm_vm_ioctl():
#0 kvm_vm_ioctl (s=0x0, type=-2146390353)
at qemu/accel/kvm/kvm-all.c:2032
#1 0x00000001003e3e2c in kvmppc_configure_v3_mmu (cpu=<optimized out>,
radix=<optimized out>, gtse=<optimized out>, proc_tbl=<optimized out>)
at qemu/target/ppc/kvm.c:396
#2 0x00000001002f8b88 in spapr_post_load (opaque=0x1019103c0,
version_id=<optimized out>) at qemu/hw/ppc/spapr.c:1578
#3 0x000000010059e4cc in vmstate_load_state (f=0x106230000,
vmsd=0x1009479e0 <vmstate_spapr>, opaque=0x1019103c0,
version_id=<optimized out>) at qemu/migration/vmstate.c:165
#4 0x00000001005987e0 in vmstate_load (f=<optimized out>, se=<optimized out>)
at qemu/migration/savevm.c:748
This patch fixes the problem by not calling the KVM function with the
TCG mode.
Fixes: d39c90f5f3 ("spapr: Fix migration of Radix guests")
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 9efddea..a471de6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1570,7 +1570,7 @@ static int spapr_post_load(void *opaque, int version_id) err = spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset); } - if (spapr->patb_entry) { + if (kvm_enabled() && spapr->patb_entry) { PowerPCCPU *cpu = POWERPC_CPU(first_cpu); bool radix = !!(spapr->patb_entry & PATBE1_GR); bool gtse = !!(cpu->env.spr[SPR_LPCR] & LPCR_GTSE); |