qemu-e2k/hw
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
..
9pfs trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
acpi hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularity 2019-05-17 15:19:24 +02:00
adc kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
alpha * Kconfig improvements (msi_nonbroken, imply for default PCI devices) 2019-03-28 09:18:53 +00:00
arm Kconfig settings for the Arm machines 2019-05-13 16:52:56 +01:00
audio Revert "audio: fix pc speaker init" 2019-04-01 08:53:40 +02:00
block nvme: fix copy direction in DMA reads going to CMB 2019-05-20 17:08:56 +02:00
bt kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
char Mostly bugfixes and cleanups, the most important being 2019-05-17 16:17:34 +01:00
core hw: report invalid disable-legacy|modern usage for virtio-1-only devs 2019-05-20 18:40:02 -04:00
cpu kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
cris cris-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
display hw: report invalid disable-legacy|modern usage for virtio-1-only devs 2019-05-20 18:40:02 -04:00
dma hw/dma: Compile the bcm2835_dma device as common object 2019-04-29 17:36:03 +01:00
gpio Pull request 2019-03-25 17:01:10 +00:00
hppa * Kconfig improvements (msi_nonbroken, imply for default PCI devices) 2019-03-28 09:18:53 +00:00
hyperv hyperv: express dependencies with kconfig 2019-03-07 21:45:53 +01:00
i2c hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig 2019-05-13 09:36:31 +02:00
i386 hw/i386/acpi: Assert a pointer is not null BEFORE using it 2019-05-17 15:19:32 +02:00
ide Kconfig settings for the Arm machines 2019-05-13 16:52:56 +01:00
input hw/input: Add a CONFIG_PS2 switch for the ps2.c file 2019-05-15 11:56:53 +02:00
intc Mostly bugfixes and cleanups, the most important being 2019-05-17 16:17:34 +01:00
ipack build: convert pci.mak to Kconfig 2019-03-07 21:45:53 +01:00
ipmi ipmi: express dependencies with kconfig 2019-03-07 21:45:53 +01:00
isa hw/i386/acpi: Add object_resolve_type_unambiguous to improve modularity 2019-05-17 15:19:24 +02:00
lm32 pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
m68k m68k-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
mem trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
microblaze pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
mips mips-fulong2e: obey -vga none 2019-05-17 15:19:38 +02:00
misc leon3: introduce the plug and play mechanism 2019-05-17 09:17:11 +01:00
moxie moxie-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
net Mostly bugfixes and cleanups, the most important being 2019-05-17 16:17:34 +01:00
nios2 Add generic Nios II board. 2019-04-29 16:09:51 +01:00
nvram trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
openrisc target/openrisc: Fix LGPL information in the file headers 2019-05-08 17:45:54 +02:00
pci hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs 2019-05-13 09:36:31 +02:00
pci-bridge kconfig: add dependencies on CONFIG_MSI_NONBROKEN 2019-03-18 09:39:57 +01:00
pci-host hw/pci-host: Use object_initialize_child for correct reference counting 2019-05-02 16:56:33 +02:00
pcmcia kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
ppc ppc patch queue 2019-04-26 2019-04-27 21:34:46 +01:00
rdma Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
riscv riscv: plic: Log guest errors 2019-04-04 16:36:21 -07:00
s390x Machine queue, 2019-04-25 2019-04-26 14:30:18 +01:00
scsi megasas: fix mapped frame size 2019-05-15 11:56:53 +02:00
sd Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
sh4 hw/usb/hcd-ohci: Move PCI-related code into a separate file 2019-05-02 08:42:17 +02:00
smbios kconfig: introduce kconfig files 2019-03-07 21:45:53 +01:00
sparc Mostly bugfixes and cleanups, the most important being 2019-05-17 16:17:34 +01:00
sparc64 * Kconfig improvements (msi_nonbroken, imply for default PCI devices) 2019-03-28 09:18:53 +00:00
ssi hw/ssi/xilinx_spips: Avoid variable length array 2019-04-29 17:35:57 +01:00
timer grlib, gptimer: get rid of the old-style create function 2019-05-17 09:17:11 +01:00
tpm Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
tricore - qtest fixes 2019-03-08 16:31:34 +00:00
unicore32 unicore32-softmmu.mak: express dependencies with Kconfig 2019-03-07 21:46:19 +01:00
usb hw/usb: avoid format truncation warning when formatting port name 2019-05-03 08:56:58 +02:00
vfio ppc patch queue 2019-04-26 2019-04-27 21:34:46 +01:00
virtio hw: report invalid disable-legacy|modern usage for virtio-1-only devs 2019-05-20 18:40:02 -04:00
watchdog trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
xen trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
xenpv xen: Replace few mentions of xend by libxl 2019-01-14 13:45:40 +00:00
xtensa Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
Kconfig kconfig: add dependencies on CONFIG_MSI_NONBROKEN 2019-03-18 09:39:57 +01:00
Makefile.objs i2c: express dependencies with Kconfig 2019-03-07 21:45:53 +01:00