From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cECSe-0006bD-Nr for qemu-devel@nongnu.org; Tue, 06 Dec 2016 04:54:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cECSb-00022f-Lo for qemu-devel@nongnu.org; Tue, 06 Dec 2016 04:54:56 -0500 Received: from 3.mo4.mail-out.ovh.net ([46.105.57.129]:38615) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cECSb-000224-ER for qemu-devel@nongnu.org; Tue, 06 Dec 2016 04:54:53 -0500 Received: from player762.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id D3DFF21B5B for ; Tue, 6 Dec 2016 10:54:51 +0100 (CET) Date: Tue, 6 Dec 2016 10:54:41 +0100 From: Greg Kurz Message-ID: <20161206105441.6f51a1f4@bahia> In-Reply-To: <20161206094708.GE12630@stefanha-x1.localdomain> References: <148095126363.31351.4484514300033863622.stgit@bahia> <20161206094708.GE12630@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/u0tdgSK5xisDXP_Mdt3Wrbz"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] [PATCH for-2.8] qdev: apply global properties in reverse order List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Peter Maydell , Marcel Apfelbaum , "Michael S. Tsirkin" , qemu-stable@nongnu.org, Stefan Hajnoczi , Cornelia Huck , Paolo Bonzini --Sig_/u0tdgSK5xisDXP_Mdt3Wrbz Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 6 Dec 2016 09:47:08 +0000 Stefan Hajnoczi wrote: > On Mon, Dec 05, 2016 at 04:21:22PM +0100, Greg Kurz wrote: > > The current code recursively applies global properties from child up to > > parent. So, if you have: > >=20 > > -global virtio-pci.disable-modern=3Don > > -global virtio-blk-pci.disable-modern=3Doff > >=20 > > Then the default value of disable-modern for a virtio-blk-pci device is= on, > > which looks wrong from an OOP perspective. > >=20 > > This patch reverses the logic, so that a child property always prevail. > >=20 > > This fixes a subtle bug that got introduced in 2.7 with commit "9a4c0e2= 20d8a > > hw/virtio-pci: fix virtio behaviour" for older (< 2.7) machine types: t= he > > HW_COMPAT_2_6 macro contains global virtio-pci.disable-* properties whi= ch > > would silently override global properties passed on the command line for > > virtio subtypes. > >=20 > > Signed-off-by: Greg Kurz > > --- > >=20 > > AFAIK, libvirt's XML doesn't know about modern/legacy modes for virtio > > devices. Early adopters of virtio 1.0 had to rely on the > > tag to pass global properties to QEMU. This patch ensures that XML files > > used with older machine types remain valid with newer versions of QEMU. > >=20 > > FWIW I guess it could help to have this fix in 2.8, and also probably in > > 2.7.1. =20 >=20 > Hi Greg, > I won't merge this for QEMU 2.8 because this 2.7 issue is not a 2.8 > release blocker and it's too risky (good points have been raised in this > thread). >=20 > Please target -stable when consensus has been reached. >=20 Sure I'll just do that. Cheers. -- Greg > Thanks, > Stefan --Sig_/u0tdgSK5xisDXP_Mdt3Wrbz Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlhGiuIACgkQAvw66wEB28Im6ACfb9Fwk/sbUQsy8nWdM6GB70GQ u/0AnjK0YyMpzWmve+9/v592s4mp6WzA =yqyz -----END PGP SIGNATURE----- --Sig_/u0tdgSK5xisDXP_Mdt3Wrbz--