virtio: verify that legacy support is not accidentally on
commit9b3a35ec8236933ab958a4c3ad883163f1ca66e7
authorCornelia Huck <cohuck@redhat.com>
Tue, 7 Jul 2020 10:54:46 +0000 (7 12:54 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 22 Jul 2020 11:57:07 +0000 (22 07:57 -0400)
treed9e576c28fb5e39837c5f7afddd720107a35475b
parent7c78bdd7a3d0086179331f10d1f6f8cdac34731a
virtio: verify that legacy support is not accidentally on

If a virtio device does not have legacy support, make sure that
it is actually off, and bail out if not.

For virtio-pci, this means that any device without legacy support
that has been specified to modern-only (or that has been forced
to it) will work.

For virtio-ccw, this duplicates the check that is currently done
prior to realization for any device that explicitly specified no
support for legacy.

This catches devices that have not been fenced properly.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20200707105446.677966-3-cohuck@redhat.com>
Cc: qemu-stable@nongnu.org
Acked-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/s390x/virtio-ccw.c
hw/virtio/virtio-pci.c