qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Greg Kurz <groug@kaod.org>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Halil Pasic <pasic@linux.vnet.ibm.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qdev: fix the order compat and global properties are applied
Date: Tue, 6 Dec 2016 18:51:46 +0100	[thread overview]
Message-ID: <20161206185146.1a5b7c0c.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20161206162545.GA4027@thinpad.lan.raisama.net>

On Tue, 6 Dec 2016 14:25:45 -0200
Eduardo Habkost <ehabkost@redhat.com> wrote:

> On Tue, Dec 06, 2016 at 04:41:12PM +0100, Greg Kurz wrote:
> > The current code recursively applies global properties from child up to
> > parent types. This can cause properties passed with the -global option to
> > be silently overridden by internal compat properties.
> > 
> > This is exactly what happens with virtio-*-pci drivers since commit:
> > 
> > "9a4c0e220d8a hw/virtio-pci: fix virtio behaviour"
> > 
> > Passing -device virtio-blk-pci.disable-modern=off has no effect on 2.6
> > machine types because the internal virtio-pci.disable-modern=on compat
> > property always prevail.
> > 
> > This patch fixes the issue by reversing the logic: we now go through the
> > global property list and, for each property, we check if it is applicable
> > to the device.
> > 
> > This result in compat properties being applied first, in the order they
> > appear in the HW_COMPAT_* macros, followed by global properties, in they
> > order appear on the command line.
> > 
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> 
> FWIW, this is the behavior I would like to see. But:
> 
> I think it's too late to change the rules on 2.8. I would like to
> change behavior only on 2.9, so we have time to discuss and test
> it. I believe the 2.8 fix should be just changing the HW_COMPAT_*
> macros to touch only the device subclasses, so we fix the
> regression introduced by commit 9a4c0e220d8a without changing any
> rules on how -global is handled.

Agreed on both counts.

      reply	other threads:[~2016-12-06 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 15:41 [Qemu-devel] [PATCH] qdev: fix the order compat and global properties are applied Greg Kurz
2016-12-06 16:25 ` Eduardo Habkost
2016-12-06 17:51   ` Cornelia Huck [this message]

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=20161206185146.1a5b7c0c.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=ehabkost@redhat.com \
    --cc=groug@kaod.org \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).