On Wed, Nov 29, 2017 at 10:58:29AM +1100, Suraj Jitindar Singh wrote: > On Tue, 2017-11-28 at 18:43 +0100, Laurent Vivier wrote: > > 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 <lviv...@redhat.com> > > Ah, guess I never hit this because I never tested tcg migration with a > qemu compiled on a kvm enabled system. Nice catch :)
Same here. In fact I had the kvm_enabled() check in the initial verions but removed later as kvmppc_configure_v3_mmu() was defined separately as nop for !CONFIG_KVM. But obviously the above combination wasn't covered. Regards, Bharata.