From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Hahn Subject: Re: 1.1.1 -> 1.1.2 migrate /managedsave issue Date: Wed, 24 Oct 2012 08:59:28 +0200 Message-ID: <201210240859.32887.hahn@univention.de> References: <50852CCF.3070000@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8666366.6dcuv9jYAE"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , KVM mailing list , Juan Quintela , "qemu-devel" To: Doug Goldstein Return-path: Received: from mail.univention.de ([82.198.197.8]:1550 "EHLO mail.univention.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933450Ab2JXG7k (ORCPT ); Wed, 24 Oct 2012 02:59:40 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: --nextPart8666366.6dcuv9jYAE Content-Type: multipart/mixed; boundary="Boundary-01=_QH5hQyUa/NvY4VT" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_QH5hQyUa/NvY4VT Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Doug, On Tuesday 23 October 2012 22:38:47 Doug Goldstein wrote: > >>> qemu: warning: error while loading state for instance 0x0 of device > >>> 'ram' load of migration failed =2E.. > >> I diagnosed that using gdb to single step kvm until I found > >> hw/pci.c#get_pci_config_device() returning -EINVAL. =2E.. > But yes I can confirm that > vmstate_load_state() which is calling field->info->get() which is > calling get_pci_config_device() is returning -EINVAL. =2E.. > Any recommendations to fix this? Or do I need to kill the saved state > and start over? =46or start try to re-get the old PXE ROM files, that is for Debian re-inst= all=20 the old etherboot-qemu or an older Version of the ipxe-qemu package. If tha= t=20 then works again, you can go further. Otherwise you need to get the exact=20 index "i" where get_pci_config_device() returns -EINVAL and match that with= =20 the PCI spec. For short see hw/pci_regs.h. =46or our Debian based UCS distribution I patched qemu(-kvm) to use the old= =20 image files (which are still available and installed in parallel to the new= =20 files) if the pc-level is 0.14 or lower (which is the version we currently= =20 ship; only our next release will switch to 1.1.2). I've attached my patch FYI. That is only a work around until QEMU provides = a=20 real solution. If you've used an e1000, that is not enougth because some mo= re=20 PCI configuration bits (PCI_STATUS_CAP_LIST) were changed in an incompatibl= e=20 way. If I remember correctly there was a different bug report, where changed PCI= =20 bits were also responsible for breaking saved states: Some PCI devices were= =20 changed to multi-function devices (or the other way around), which also=20 breaks loading of previous saved stated. I think it was a bug in libvirt=20 which started adding an explicit "multifunction=3Don", while the save was d= one=20 using an implicit "multifinction=3Doff".=20 ( in our= =20 German BZ) Sincerely Philipp Hahn =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH be open. fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ --Boundary-01=_QH5hQyUa/NvY4VT Content-Type: text/x-diff; charset="iso-8859-15"; name="0002-Bug-24702-Rom-file-compatibility.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0002-Bug-24702-Rom-file-compatibility.patch" diff -urN qemu-kvm-1.1.2+dfsg.orig/debian/patches/romfile-compatibility.dif= f qemu-kvm-1.1.2+dfsg/debian/patches/romfile-compatibility.diff =2D-- qemu-kvm-1.1.2+dfsg.orig/debian/patches/romfile-compatibility.diff 19= 70-01-01 01:00:00.000000000 +0100 +++ qemu-kvm-1.1.2+dfsg/debian/patches/romfile-compatibility.diff 2012-10-0= 8 14:25:09.225656404 +0200 @@ -0,0 +1,39 @@ +Bug #24702: Fix PXE ROM size mismatch + +For pc-0.14 and older use the PXE ROMs from the deprecated etherboot-qemu +package, which have different sizes. Without the patch the virtual PC gets +build with the current ROM sizes. Loading then fails because the stored PC= I ROM +BAR size mismatches the configured size. +--- a/hw/pc_piix.c ++++ b/hw/pc_piix.c +@@ -433,6 +433,30 @@ static QEMUMachine pc_machine_v0_15 =3D { + .driver =3D "virtio-balloon-pci",\ + .property =3D "event_idx",\ + .value =3D "off",\ ++ },{\ ++ .driver =3D "ne2000",\ ++ .property =3D "romfile",\ ++ .value =3D "/usr/lib/etherboot/rtl8029.rom",\ ++ },{\ ++ .driver =3D "rtl8139",\ ++ .property =3D "romfile",\ ++ .value =3D "/usr/lib/etherboot/rtl8139.rom",\ ++ },{\ ++ .driver =3D "e1000",\ ++ .property =3D "romfile",\ ++ .value =3D "/usr/lib/etherboot/e1000-82540em.rom",\ ++ },{\ ++ .driver =3D "pcnet",\ ++ .property =3D "romfile",\ ++ .value =3D "/usr/lib/etherboot/pcnet32.rom",\ ++ },{\ ++ .driver =3D "ne2k-isa",\ ++ .property =3D "romfile",\ ++ .value =3D "/usr/lib/etherboot/ne.rom",\ ++ },{\ ++ .driver =3D "virtio-net-pci",\ ++ .property =3D "romfile",\ ++ .value =3D "/usr/lib/etherboot/virtio-net.rom",\ + } +=20 + static QEMUMachine pc_machine_v0_14 =3D { diff -urN qemu-kvm-1.1.2+dfsg.orig/debian/patches/series qemu-kvm-1.1.2+dfs= g/debian/patches/series =2D-- qemu-kvm-1.1.2+dfsg.orig/debian/patches/series 2012-09-10 12:14:05.00= 0000000 +0200 +++ qemu-kvm-1.1.2+dfsg/debian/patches/series 2012-10-08 14:24:51.497155189= +0200 @@ -8,3 +8,4 @@ =20 net-add--netdev-options-to-man-page.patch revert-serial-fix-retry-logic.patch +romfile-compatibility.diff diff -urN qemu-kvm-1.1.2+dfsg.orig/debian/control qemu-kvm-1.1.2+dfsg/debia= n/control =2D-- qemu-kvm-1.1.2+dfsg.orig/debian/control 2012-09-11 08:29:43.000000000= +0200 +++ qemu-kvm-1.1.2+dfsg/debian/control 2012-10-08 15:06:39.201155102 +0200 @@ -37,7 +37,8 @@ seabios (>> 1.7.0~), vgabios (>=3D 0.6c-3~), qemu-keymaps, qemu-utils (>> 0.14.0), ipxe-qemu | ipxe (<< 1.0.0+git-20120202.f6840ba-2) =2DRecommends: bridge-utils, iproute +Recommends: bridge-utils, iproute, + etherboot-qemu Suggests: debootstrap, vde2, samba Provides: kvm Conflicts: kvm-source (<=3D 18-1), kvm-data (<=3D 66+dfsg-1.1), kvm (<< 1:= 0) --Boundary-01=_QH5hQyUa/NvY4VT-- --nextPart8666366.6dcuv9jYAE Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAlCHkdAACgkQYPlgoZpUDjmMHgCfVzpmCgLeuiCyCKyUmThuMm2x HZEAn1N19uWY8TkU8cDjFzUhP9A+RuYD =s5ab -----END PGP SIGNATURE----- --nextPart8666366.6dcuv9jYAE--