qemu/hw/display
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
..
ads7846.c ssi: change ssi_slave_init to be a realize ops 2016-07-04 13:15:22 +01:00
ati_2d.c Clean up includes 2019-05-13 08:58:55 +02:00
ati_dbg.c Clean up includes 2019-05-13 08:58:55 +02:00
ati_int.h Clean up includes 2019-05-13 08:58:55 +02:00
ati_regs.h hw/display: Add basic ATI VGA emulation 2019-03-11 08:04:55 +01:00
ati.c Clean up includes 2019-05-13 08:58:55 +02:00
bcm2835_fb.c hw/display/bcm2835_fb: Silence Coverity warning about multiply overflow 2018-10-08 14:55:05 +01:00
blizzard.c hw/devices: Move Blizzard declarations into a new header 2019-04-29 17:57:21 +01:00
bochs-display.c bochs-display: wire up edid support 2018-10-15 09:57:33 +02:00
cg3.c cpus hw target: Use warn_report() & friends to report warnings 2018-10-19 14:51:34 +02:00
cirrus_vga_internal.h hw/display/cirrus_vga: Move "isa-cirrus-vga" device into a separate file 2018-10-15 09:57:33 +02:00
cirrus_vga_isa.c hw/display/cirrus_vga: Move "isa-cirrus-vga" device into a separate file 2018-10-15 09:57:33 +02:00
cirrus_vga_rop2.h cirrus: fix PUTPIXEL macro 2017-03-27 12:14:45 +02:00
cirrus_vga_rop.h cirrus: fix off-by-one in cirrus_bitblt_rop_bkwd_transp_*_16 2017-03-17 10:23:44 +01:00
cirrus_vga.c hw/display/cirrus_vga: Remove unused include 2019-05-07 09:11:27 +02:00
dpcd.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
edid-generate.c edid: silence a stringop-overflow warning 2018-11-12 14:14:18 +01:00
edid-region.c display/edid: add region helper. 2018-09-27 08:07:51 +02:00
exynos4210_fimd.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
framebuffer.c memory: hide memory_region_sync_dirty_bitmap behind DirtyBitmapSnapshot 2018-02-13 16:15:09 +01:00
framebuffer.h framebuffer: set DIRTY_MEMORY_VGA on RAM that is used for the framebuffer 2015-07-24 13:57:45 +02:00
g364fb.c display/g364fb: Convert sysbus init function to realize function 2018-12-13 13:47:57 +00:00
i2c-ddc.c i2c-ddc: move it to hw/display 2019-05-07 09:56:10 +02:00
jazz_led.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
Kconfig hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig 2019-05-13 09:36:32 +02:00
Makefile.objs i2c-ddc: move it to hw/display 2019-05-07 09:56:10 +02:00
milkymist-tmu2.c hw/display/milkymist-tmu2: Move inlined code from header to source 2019-02-01 11:58:50 +01:00
milkymist-vgafb_template.h milkymist-vgafb: swap pixel data in source buffer 2014-02-04 19:34:30 +01:00
milkymist-vgafb.c milkymist: update specification URLs 2016-06-20 18:12:04 +02:00
omap_dss.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
omap_lcd_template.h omap_lcdc: Remove support for DEPTH != 32 2016-05-12 13:22:24 +01:00
omap_lcdc.c omap_lcdc: Remove support for DEPTH != 32 2016-05-12 13:22:24 +01:00
pl110_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
pl110.c pl110: Implement vertical compare/next base interrupts 2018-01-25 11:45:30 +00:00
pxa2xx_lcd.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
pxa2xx_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
qxl-logger.c hw/display: Clean up includes 2016-01-29 15:07:24 +00:00
qxl-render.c qxl: support mono cursors with inverted colors 2018-09-27 08:10:07 +02:00
qxl.c qxl: avoid unaligned pointer reads/writes 2019-05-07 09:55:07 +02:00
qxl.h qxl: store channel id in qxl->id 2018-10-29 10:43:19 +01:00
ramfb-standalone.c trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
ramfb.c ramfb: enable vgabios 2018-07-02 17:21:52 +02:00
sii9022.c i2c-ddc: move it to hw/display 2019-05-07 09:56:10 +02:00
sm501_template.h sm501: Misc clean ups 2017-04-24 12:32:12 +01:00
sm501.c i2c-ddc: move it to hw/display 2019-05-07 09:56:10 +02:00
ssd0303.c i2c: have I2C receive operation return uint8_t 2019-02-27 21:06:08 -06:00
ssd0323.c vmstateify ssd0323 display 2016-09-22 18:13:08 +01:00
tc6393xb_template.h display: avoid multi-statement macro 2014-01-31 14:47:33 +00:00
tc6393xb.c hw/devices: Move TC6393XB declarations into a new header 2019-04-29 17:57:21 +01:00
tcx.c cpus hw target: Use warn_report() & friends to report warnings 2018-10-19 14:51:34 +02:00
trace-events trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
vga_int.h vga_int: remove unused function protype 2018-10-29 10:43:48 +01:00
vga_regs.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
vga-helpers.h vga: stop passing pointers to vga_draw_line* functions 2017-09-01 13:52:43 +02:00
vga-isa-mm.c hw/display/vga-isa-mm: Convert away from old_mmio 2018-08-21 09:52:22 +02:00
vga-isa.c vga: disable global_vmstate for 3.0+ machine types 2018-07-03 11:19:49 +02:00
vga-pci.c secondary-vga: delete mmio subregions upon exit 2018-10-05 11:23:37 +02:00
vga.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
virtio-gpu-3d.c display/virtio: add edid support. 2019-02-22 07:25:04 +01:00
virtio-gpu-pci.c hw: report invalid disable-legacy|modern usage for virtio-1-only devs 2019-05-20 18:40:02 -04:00
virtio-gpu.c virtio-gpu: clear command and fence queues on reset 2019-03-18 13:10:57 +01:00
virtio-vga.c hw: report invalid disable-legacy|modern usage for virtio-1-only devs 2019-05-20 18:40:02 -04:00
vmware_vga.c use dpy_gfx_update_full 2018-08-30 13:24:13 +02:00
xenfb.c xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
xlnx_dp.c audio: use qapi AudioFormat instead of audfmt_e 2019-03-11 10:29:26 +01:00