From: "Daniel P. Berrange" <berrange@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-stable@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.8] qdev: apply global properties in reverse order
Date: Mon, 5 Dec 2016 17:34:48 +0000 [thread overview]
Message-ID: <20161205173448.GS2498@redhat.com> (raw)
In-Reply-To: <148095126363.31351.4484514300033863622.stgit@bahia>
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:
>
> -global virtio-pci.disable-modern=on
> -global virtio-blk-pci.disable-modern=off
>
> Then the default value of disable-modern for a virtio-blk-pci device is on,
> which looks wrong from an OOP perspective.
>
> This patch reverses the logic, so that a child property always prevail.
>
> This fixes a subtle bug that got introduced in 2.7 with commit "9a4c0e220d8a
> hw/virtio-pci: fix virtio behaviour" for older (< 2.7) machine types: the
> HW_COMPAT_2_6 macro contains global virtio-pci.disable-* properties which
> would silently override global properties passed on the command line for
> virtio subtypes.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>
> 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 <qemu:commandline>
> 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.
FYI, we explicitly do *not* guarantee any kind of stability/compatibility
if you use qemu:commandline. Users should expect it to break when they
upgrade QEMU and/or libvirt.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
next prev parent reply other threads:[~2016-12-05 17:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 15:21 [Qemu-devel] [PATCH for-2.8] qdev: apply global properties in reverse order Greg Kurz
2016-12-05 15:42 ` Cornelia Huck
2016-12-05 16:01 ` Cornelia Huck
2016-12-06 8:27 ` Greg Kurz
2016-12-05 16:48 ` Eduardo Habkost
2016-12-05 17:25 ` Cornelia Huck
2016-12-05 17:41 ` Eduardo Habkost
2016-12-05 18:14 ` Halil Pasic
2016-12-06 9:11 ` Greg Kurz
2016-12-06 12:38 ` Halil Pasic
2016-12-06 9:30 ` Greg Kurz
2016-12-06 12:08 ` Halil Pasic
2016-12-05 19:33 ` Greg Kurz
2016-12-05 19:11 ` Greg Kurz
2016-12-05 17:34 ` Daniel P. Berrange [this message]
2016-12-06 9:47 ` Stefan Hajnoczi
2016-12-06 9:54 ` Greg Kurz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161205173448.GS2498@redhat.com \
--to=berrange@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=groug@kaod.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.