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
..
bus.c qdev: pass an Object * to qbus_set_hotplug_handler() 2019-02-17 21:54:02 +11:00
empty_slot.c core/empty_slot: Convert sysbus init function to realize function 2018-12-13 13:47:57 +00:00
fw-path-provider.c hw/core: Clean up includes 2016-01-29 15:07:25 +00:00
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 call HotplugHandler->plug() as the last step in device realization 2018-10-19 13:44:12 +02:00
irq.c tcg: drop global lock during TCG code execution 2017-02-24 10:32:45 +00:00
Kconfig kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
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
Makefile.objs hw/core: Move null-machine into the common-obj list 2018-10-24 07:27:25 +01:00
nmi.c nmi: remove x86 specific nmi handling 2016-05-23 16:53:46 +02:00
null-machine.c hw/core: Move null-machine into the common-obj list 2018-10-24 07:27:25 +01:00
or-irq.c hw/core/or-irq: Support more than 16 inputs to an OR gate 2018-06-15 15:23:34 +01:00
platform-bus.c hw: Do not include "exec/address-spaces.h" if it is not necessary 2018-06-01 14:15:10 +02:00
ptimer.c ptimer: Add TRIGGER_ONLY_ON_DECREMENT policy option 2018-07-09 14:51:34 +01:00
qdev-fw.c linux-user: remove nmi.c and fw-path-provider.c 2018-01-23 14:20:52 +01:00
qdev-properties-system.c hw: set_netdev: remove useless code 2018-12-11 18:28:46 +01:00
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 hw/core/register: Add trailing '\n' to qemu_log() call 2018-06-08 13:15:33 +01:00
reset.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
split-irq.c hw/core/split-irq: Device that splits IRQ lines 2018-03-02 11:03:45 +00:00
stream.c hw/core: Clean up includes 2016-01-29 15:07:25 +00:00
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