[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6 |
Date: |
Fri, 4 Jan 2019 14:11:36 -0200 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Fri, Jan 04, 2019 at 10:49:19AM +0100, Cornelia Huck wrote:
> On Fri, 4 Jan 2019 01:22:26 -0200
> Eduardo Habkost <address@hidden> wrote:
>
> > The virtio-pci entries in HW_COMPAT_2_6 had an implicit
> > assumption: that all virtio-pci subclasses support the
> > disable-legacy and disable-modern options.
> >
> > That assumption was broken by commit f6e501a28ef9 ("virtio:
> > Provide version-specific variants of virtio PCI devices"). This
> > caused QEMU to crash if using the new -non-transitional or
> > -transitional device types:
> >
> > $ qemu-system-x86_64 -machine pc-i440fx-2.6 \
> > -device virtio-net-pci-non-transitional
> > Unexpected error in object_property_find() at qom/object.c:1092:
> > qemu-system-x86_64: -device virtio-net-pci-non-transitional: can't apply \
> > global virtio-pci.disable-modern=on: Property '.disable-modern' not found
> > Aborted (core dumped)
> >
> > Replace the virtio-pci.disable-legacy=off and
> > virtio-pci.disable-modern=on entries on HW_COMPAT_2_6 with
> > explicit entries for each generic virtio device type.
> >
> > The full list of generic virtio device types was extracted by
> > just grepping for ".generic_name". Note that we don't need to
> > worry about listing new virtio-pci devices in HW_COMPAT_2_6 in
> > the future, because new devices won't require QEMU 2.6
> > compatibility.
>
> Some of these will not be relevant for 2.6 compat, but better safe than
> sorry :)
Yes. My first version was based on grepping the v2.6.0 tree, but
then I decided to be safer and grep for ".generic_name" on
qemu.git master. Just in case somebody is using a v2.7+ device
type with 2.6 machine-types.
>
> >
> > This makes the compat entries annoyingly verbose, but is simpler
> > than the alternative of making the virtio-pci type inheritance
> > rules even more complex.
>
> Maybe also write out explicitly:
>
> Fixes: f6e501a28ef9 ("virtio: Provide version-specific variants of virtio PCI
> devices")
Yes, I forgot to do it. Thanks no noting!
>
> >
> > Reported-by: Thomas Huth <address@hidden>
> > Signed-off-by: Eduardo Habkost <address@hidden>
> > ---
> > ---
> > include/hw/compat.h | 140 +++++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 138 insertions(+), 2 deletions(-)
>
> Reviewed-by: Cornelia Huck <address@hidden>
--
Eduardo
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, (continued)
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Eduardo Habkost, 2019/01/04
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Eduardo Habkost, 2019/01/04
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Michael S. Tsirkin, 2019/01/04
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Eduardo Habkost, 2019/01/04
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Michael S. Tsirkin, 2019/01/04
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Eduardo Habkost, 2019/01/04
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Cornelia Huck, 2019/01/07
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Eduardo Habkost, 2019/01/07
Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Eduardo Habkost, 2019/01/04
Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6, Cornelia Huck, 2019/01/04
- Re: [Qemu-devel] [PATCH] compat: Use explicit type names on HW_COMPAT_2_6,
Eduardo Habkost <=