[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] qdev: fix the order compat and global prope
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] qdev: fix the order compat and global properties are applied |
Date: |
Tue, 11 Jul 2017 14:46:31 +0200 |
On Mon, 10 Jul 2017 21:43:01 -0300
Eduardo Habkost <address@hidden> wrote:
Some description tweaks, as we had the workaround in the meanwhile:
> From: Greg Kurz <address@hidden>
>
> 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:
s/happens/happened/
s/since/after/
>
> "9a4c0e220d8a hw/virtio-pci: fix virtio behaviour"
>
> Passing -device virtio-blk-pci.disable-modern=off has no effect on 2.6
s/has/had/
> machine types because the internal virtio-pci.disable-modern=on compat
> property always prevail.
s/prevail/prevailed/
A workaround for this was included with commit 0bcba41f ("machine:
Convert abstract typename on compat_props to subclass names").
>
> This patch fixes the issue by reversing the logic: we now go through the
s/fixes the issue/fixes the issue properly/
> 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
s/result/results/
> appear in the HW_COMPAT_* macros, followed by global properties, in they
> order appear on the command line.
s/in they order appear/in the order they appear/
>
> Signed-off-by: Greg Kurz <address@hidden>
> Message-Id: <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> hw/core/qdev-properties.c | 15 ++-------------
> 1 file changed, 2 insertions(+), 13 deletions(-)
Reviewed-by: Cornelia Huck <address@hidden>
[Qemu-devel] [PATCH 2/3] test-qdev-global-props: Test global property ordering, Eduardo Habkost, 2017/07/10