qemu/hw/core
Daniel P. Berrangé f2784eed30 hw: report invalid disable-legacy|modern usage for virtio-1-only devs
A number of virtio devices (gpu, crypto, mouse, keyboard, tablet) only
support the virtio-1 (aka modern) mode. Currently if the user launches
QEMU, setting those devices to enable legacy mode, QEMU will silently
create them in modern mode, ignoring the user's (mistaken) request.

This patch introduces proper data validation so that an attempt to
configure a virtio-1-only devices in legacy mode gets reported as an
error to the user.

Checking this required introduction of a new field to explicitly track
what operating model is to be used for a device, separately from the
disable_modern and disable_legacy fields that record the user's
requested configuration.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190215103239.28640-2-berrange@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-05-20 18:40:02 -04:00
..
Kconfig kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
Makefile.objs
bus.c qdev: pass an Object * to qbus_set_hotplug_handler() 2019-02-17 21:54:02 +11:00
empty_slot.c
fw-path-provider.c
generic-loader.c elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
hotplug.c
irq.c
loader-fit.c loader-fit: Wean off error_printf() 2019-04-17 21:21:49 +02:00
loader.c roms: assert if max rom size is less than the used size 2019-05-15 11:56:53 +02:00
machine.c hw: report invalid disable-legacy|modern usage for virtio-1-only devs 2019-05-20 18:40:02 -04:00
nmi.c
null-machine.c
or-irq.c
platform-bus.c
ptimer.c
qdev-fw.c
qdev-properties-system.c
qdev-properties.c qdev-props: call object_apply_global_props() 2019-01-07 16:18:42 +04:00
qdev.c qom: Move compat_props machinery from qdev to QOM 2019-03-11 22:53:44 +01:00
register.c
reset.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
split-irq.c
stream.c
sysbus.c sysbus: Fix latent bug with onboard devices 2019-03-11 22:53:44 +01:00
uboot_image.h Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00