Public bug reported: ---Problem Description--- P8 compat mode migration fails for Ubuntu 16.04.4 P8 Guest from Ubuntu 16.04.4 P8 Host -> Ubuntu 18.04 P9 Host
We need backport of upstream qemu patch and its dependencies to Ubuntu 18.04 to fix it, commit 72fdd4de8e5fdc1a6078e000835fb54592a3fe97 Author: Greg Kurz <[email protected]> Date: Tue Feb 27 16:22:58 2018 +0100 spapr: register dummy ICPs later Some older machine types create more ICPs than needed. We hence need to register up to xics_max_server_number() dummy ICPs to accomodate the migration of these machine types. Recent VSMT rework changed xics_max_server_number() to return DIV_ROUND_UP(max_cpus * spapr->vsmt, smp_threads) instead of DIV_ROUND_UP(max_cpus * kvmppc_smt_threads(), smp_threads); The change is okay but it requires spapr->vsmt to be set, which isn't the case with the current code. This causes the formula to return zero and we don't create dummy ICPs. This breaks migration of older guests as reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1549087 The dummy ICP workaround doesn't really have a dependency on XICS itself. But it does depend on proper VCPU id numbering and it must be applied before creating vCPUs (ie, creating real ICPs). So this patch moves the workaround to spapr_init_cpus(), which already assumes VSMT to be set. Fixes: 72194664c8a1 ("spapr: use spapr->vsmt to compute VCPU ids") Reported-by: Lukas Doktor <[email protected]> Signed-off-by: Greg Kurz <[email protected]> Signed-off-by: David Gibson <[email protected]> ---uname output--- P9 Host Ubuntu 18.04 (Destination) Kernel: # uname -a Linux ltc-boston17 4.15.0-15-generic #16-Ubuntu SMP Wed Apr 4 13:57:51 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux Qemu: # dpkg -l | grep qemu ii ipxe-qemu 1.0.0+git-20180124.fbe8c52d-0ubuntu2 all PXE boot firmware - ROM images for qemu ii ipxe-qemu-256k-compat-efi-roms 1.0.0+git-20150424.a25a16d-0ubuntu2 all PXE boot firmware - Compat EFI ROM images for qemu ii qemu-block-extra:ppc64el 1:2.11+dfsg-1ubuntu6 ppc64el extra block backend modules for qemu-system and qemu-utils ii qemu-kvm 1:2.11+dfsg-1ubuntu6 ppc64el QEMU Full virtualization on x86 hardware ii qemu-slof 20170724+dfsg-1ubuntu1 all Slimline Open Firmware -- QEMU PowerPC version ii qemu-system-common 1:2.11+dfsg-1ubuntu6 ppc64el QEMU full system emulation binaries (common files) ii qemu-system-ppc 1:2.11+dfsg-1ubuntu6 ppc64el QEMU full system emulation binaries (ppc) ii qemu-utils 1:2.11+dfsg-1ubuntu6 ppc64el QEMU utilities # dpkg -l | grep libvirt ii libvirt-bin 4.0.0-1ubuntu7 ppc64el programs for the libvirt library ii libvirt-clients 4.0.0-1ubuntu7 ppc64el Programs for the libvirt library ii libvirt-daemon 4.0.0-1ubuntu7 ppc64el Virtualization daemon ii libvirt-daemon-driver-storage-rbd 4.0.0-1ubuntu7 ppc64el Virtualization daemon RBD storage driver ii libvirt-daemon-system 4.0.0-1ubuntu7 ppc64el Libvirt daemon configuration files ii libvirt-dev:ppc64el 4.0.0-1ubuntu7 ppc64el development files for the libvirt library ii libvirt-glib-1.0-0:ppc64el 1.0.0-1 ppc64el libvirt GLib and GObject mapping library ii libvirt0:ppc64el 4.0.0-1ubuntu7 ppc64el library for interfacing with different virtualization systems ii python-libvirt 4.0.0-1 ppc64el libvirt Python bindings P8 Host Ubuntu 16.04.4 (Source) Kernel: # uname -a Linux pkvmhab006 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:46:55 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux Qemu: # dpkg -l | grep qemu ii ipxe-qemu 1.0.0+git-20150424.a25a16d-1ubuntu1.2 all PXE boot firmware - ROM images for qemu ii qemu-block-extra:ppc64el 1:2.5+dfsg-5ubuntu10.24 ppc64el extra block backend modules for qemu-system and qemu-utils ii qemu-kvm 1:2.5+dfsg-5ubuntu10.24 ppc64el QEMU Full virtualization ii qemu-slof 20151103+dfsg-1ubuntu1.1 all Slimline Open Firmware -- QEMU PowerPC version ii qemu-system-common 1:2.5+dfsg-5ubuntu10.24 ppc64el QEMU full system emulation binaries (common files) ii qemu-system-ppc 1:2.5+dfsg-5ubuntu10.24 ppc64el QEMU full system emulation binaries (ppc) ii qemu-utils 1:2.5+dfsg-5ubuntu10.24 ppc64el QEMU utilities # dpkg -l | grep libvirt ii libvirt-bin 1.3.1-1ubuntu10.19 ppc64el programs for the libvirt library ii libvirt-dev:ppc64el 1.3.1-1ubuntu10.19 ppc64el development files for the libvirt library ii libvirt0:ppc64el 1.3.1-1ubuntu10.19 ppc64el library for interfacing with different virtualization systems ii python-libvirt 1.3.1-1ubuntu1.1 ppc64el libvirt Python bindings P8 Guest: Kernel: # uname -a Linux ubuntu 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:46:55 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux Machine Type = Boston ---Debugger--- A debugger is not configured ---Steps to Reproduce--- 1. Boot healthy P8 16.04.4 Ubuntu guest on P8 host 2. Have P9 Host with 18.04 Ubuntu build and allow iptables to permit migration 3. Perform migration and the error observed, virsh -c 'qemu:///system' migrate --live --domain avocado-vt- vm1-migration --desturi qemu+ssh://9.40.193.215/system --timeout 60 error: internal error: qemu unexpectedly closed the monitor: on,vhostfd=32 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c6:c7:c8,bus=pci.0,addr=0x1 -chardev pty,id=charserial0 -device spapr-vty,chardev=charserial0,id=serial0,reg=0x30000000 -incoming defer -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on 2018-04-12T11:28:56.425071Z qemu-system-ppc64: Unknown savevm section or instance 'icp/server' 32 2018-04-12T11:28:56.431349Z qemu-system-ppc64: load of migration failed: Invalid argument Userspace tool common name: Qemu The userspace tool has the following bit modes: ppc64le Userspace package: qemu-kvm 1:2.11+dfsg-1ubuntu6 ** Affects: ubuntu-power-systems Importance: Critical Status: New ** Affects: qemu (Ubuntu) Importance: Undecided Assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) Status: New ** Tags: architecture-ppc64le bugnameltc-166667 severity-critical targetmilestone-inin1804 triage-g ** Tags added: architecture-ppc64le bugnameltc-166667 severity-critical targetmilestone-inin1804 ** Changed in: ubuntu Assignee: (unassigned) => Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) ** Package changed: ubuntu => qemu (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1763468 Title: [Ubuntu 18.04] P8 compat mode migration fails for Ubuntu 16.04.4 P8 Guest from Ubuntu 16.04.4 P8 Host -> Ubuntu 18.04 P9 Host To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-power-systems/+bug/1763468/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
