[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-p
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers |
Date: |
Tue, 6 Dec 2016 21:31:43 +0200 |
On Tue, Dec 06, 2016 at 06:50:47PM +0100, Greg Kurz wrote:
> 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 should ideally be fixed in the qdev properties core code, but it is
> too late in the QEMU 2.8 schedule. So this patch fixes the issue by setting
> the compat properties for every virtio-*-pci subtypes instead of the base
> virtio-pci type.
>
> Signed-off-by: Greg Kurz <address@hidden>
What's the rush? Either the issue is or isn't 2.8 material. If it is,
let's fix it in qdev core now. If it isn't no need for quick fixes,
just wait a bit and merge qdev core fix after 2.8 is out.
> ---
>
> This fix is for both QEMU 2.8 and 2.7.1.
>
> Generated with:
>
> for i in $(git grep 'define TYPE_VIRTIO_.*_PCI' hw/virtio/virtio-pci.h | \
> awk '{print $3 }'); do
> printf '{\\'"\n .driver = %s,"'\\'"\n .property =
> \"disable-modern\","'\\'"\n .value = \"on\","'\\'"\n },{"'\\'"\n
> .driver = %s,"'\\'"\n .property = \"disable-legacy\","'\\'"\n
> .value = \"off\","'\\'"\n }," $i $i
> done
>
> include/hw/compat.h | 116
> ++++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 114 insertions(+), 2 deletions(-)
>
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index 0f06e113bee2..793ba3ddb393 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -26,11 +26,123 @@
> .property = "format_transport_address",\
> .value = "off",\
> },{\
> - .driver = "virtio-pci",\
> + .driver = "virtio-scsi-pci",\
> .property = "disable-modern",\
> .value = "on",\
> },{\
> - .driver = "virtio-pci",\
> + .driver = "virtio-scsi-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-blk-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-blk-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-balloon-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-balloon-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-serial-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-serial-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-net-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-net-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-9p-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-9p-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-rng-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-rng-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-input-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-input-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-input-hid-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-input-hid-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-keyboard-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-keyboard-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-mouse-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-mouse-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-tablet-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-tablet-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-input-host-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-input-host-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-gpu-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-gpu-pci",\
> + .property = "disable-legacy",\
> + .value = "off",\
> + },{\
> + .driver = "virtio-crypto-pci",\
> + .property = "disable-modern",\
> + .value = "on",\
> + },{\
> + .driver = "virtio-crypto-pci",\
> .property = "disable-legacy",\
> .value = "off",\
> },
- Re: [Qemu-stable] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, (continued)
- Re: [Qemu-stable] [Qemu-devel] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Eduardo Habkost, 2016/12/09
- Re: [Qemu-stable] [Qemu-devel] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Cornelia Huck, 2016/12/12
- Re: [Qemu-stable] [Qemu-devel] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Greg Kurz, 2016/12/12
- Re: [Qemu-stable] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Cornelia Huck, 2016/12/12
- Re: [Qemu-stable] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Eduardo Habkost, 2016/12/12
- Re: [Qemu-stable] [Qemu-devel] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Halil Pasic, 2016/12/12
- Re: [Qemu-stable] [Qemu-devel] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Eduardo Habkost, 2016/12/12
- Re: [Qemu-stable] [Qemu-devel] [RFC for-2.8] machine: Convert abstract typename on compat_props to subclass names, Halil Pasic, 2016/12/12
Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers,
Michael S. Tsirkin <=
- Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers, Eduardo Habkost, 2016/12/06
- Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers, Michael S. Tsirkin, 2016/12/06
- Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers, Eduardo Habkost, 2016/12/06
- Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers, Michael S. Tsirkin, 2016/12/06
- Re: [Qemu-stable] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers, Eduardo Habkost, 2016/12/06
- Re: [Qemu-stable] [Qemu-devel] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers, Stefan Hajnoczi, 2016/12/06
- Re: [Qemu-stable] [Qemu-devel] [PATCH] virtio: fix HW_COMPAT_2_6 macro for virtio-*-pci drivers, Greg Kurz, 2016/12/07