From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aU6Cb-0006x3-92 for qemu-devel@nongnu.org; Fri, 12 Feb 2016 00:23:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aU6Ca-0004mq-3F for qemu-devel@nongnu.org; Fri, 12 Feb 2016 00:23:33 -0500 Date: Fri, 12 Feb 2016 16:24:26 +1100 From: David Gibson Message-ID: <20160212052426.GE2732@voom.fritz.box> References: <20160208155947.11480.87951.stgit@bahia.huguette.org> <20160210212612.07123ed3@bahia.huguette.org> <20160211165339.GC2529@work-vm> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MiFvc8Vo6wRSORdP" Content-Disposition: inline In-Reply-To: <20160211165339.GC2529@work-vm> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: skip configuration section during migration of older machines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: Juan Quintela , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Greg Kurz --MiFvc8Vo6wRSORdP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 11, 2016 at 04:53:40PM +0000, Dr. David Alan Gilbert wrote: > * Greg Kurz (gkurz@linux.vnet.ibm.com) wrote: > > On Mon, 08 Feb 2016 16:59:47 +0100 > > Greg Kurz wrote: > > > Since QEMU 2.4, we have a configuration section in the migration stre= am. > > > This must be skipped for older machines, like it is already done for = x86. > > >=20 > >=20 > > Ouch ! It is more complex than I thought... the migration of pseries-2.3 > > machine is already broken between QEMU-2.3 and QEMU-2.4. So this patch > > fixes indeed migration of a pseries-2.3 machine from QEMU-2.3, but it > > breaks migration of the same machine from QEMU-2.4 and up. > >=20 > > Not sure how to deal with that... is it reasonable to assume that > > pseries-2.3 running with QEMU-2.3 is the common case ? If so, this > > patch would bring more help than harm. >=20 > Unfortunately we can not fix history, so we have to pick something to fix. > So unless there is another reason, then I normally say keep it working > between the latest versions of qemu; i.e. if someone is running qemu 2.5 = with > -M 2.3 then dont break it when they try and migrate to 2.6, even though > this would fix an older qemu migrating into 2.6. Yeah, I tend to agree, but I'd change my mind if there's evidence that the older qemu is much more widely deployed. IIUC that would entail no actual change to the code yes? But I think we should put a comment there saying what the fix would be to talk to the older qemu, and why we chose not to apply it. > However, as discussed on irc you might be able to fudge it; for example > using qemu_peek_byte to test whether or not you have a configuration > section, and making it not error for some machine types. This isn't > pretty, but if it's important for you to get the coniguration working > then it's the type of trick that might work. >=20 > Dave >=20 > >=20 > > > Fixes: 61964c23e5ddd5a33f15699e45ce126f879e3e33 > > > Cc: qemu-stable@nongnu.org > > > Signed-off-by: Greg Kurz > > > --- > > > hw/ppc/spapr.c | 1 + > > > 1 file changed, 1 insertion(+) > > >=20 > > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > > index 5bd8fd3ef842..bca7cb8a5d27 100644 > > > --- a/hw/ppc/spapr.c > > > +++ b/hw/ppc/spapr.c > > > @@ -2446,6 +2446,7 @@ static void spapr_machine_2_3_instance_options(= MachineState *machine) > > > spapr_machine_2_4_instance_options(machine); > > > savevm_skip_section_footers(); > > > global_state_set_optional(); > > > + savevm_skip_configuration(); > > > } > > >=20 > > > static void spapr_machine_2_3_class_options(MachineClass *mc) > > >=20 > > >=20 > >=20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --MiFvc8Vo6wRSORdP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWvWyKAAoJEGw4ysog2bOSy04P/R09tP1ABp2/pSaOdUt0DXEj 8OP6bT+5aSbBUPOm3lc9i5y9ZxsuI9ahrHmMvovnGjSasKUkcY09jSHJmIwbghp8 g43ijocpA+1hlNToIVSMZclDD9x98SgZgySA6RSZOh4JIr2+zQqiNiirsNMTOEZb BBA/4bVtA8Tyd0A/PEIAqJ9/qaRP4axzOLZG8UWPg8xRjcBeelw+28nosBn8Zd3L 61AfqU4tF5nwScW/d/AGJw8fJkzFFX/sAweRK3KxGRmqQBM2AoWv/doYdq45PRO0 +3BRKktgcQa+ZT5Z6VqHgIkIyH+iGgKr8xeMGL60wqsOYK7k1NHBqa0UGALfH6w8 ZXKjexPNkR6iWWkVuuoIMUsUhE4UQC6vS4vVxLD4GO4xr5XR8UH3TgCCf5Wx0FYW /53IVLGzeKrF37Lc+zxUDVNtknWNK+q/H0KPza4h0iYNuR0JmOZjrL8vzrxMHrOr pvXsu4lAdnC+452Pz/GyqS9NsT/UUNTr2dXNv8yMwa+v8P5ErZI89i89k9E6KZJs nVfO+mV7+Z+NiOPK8i+Ics3GQL02zUGtcS0/fkKOLgRfTxDfrVeh46vXGsfq3Sib jlU2xYwHdnsFEyGiTzHOmQs7m6a1Vg8m0ISH9rIMUenF8PQNEBY9pL0K5Kdp/4l2 JJxn8FhCKpraQSplg7In =Kl+b -----END PGP SIGNATURE----- --MiFvc8Vo6wRSORdP--