xemu/hw/block
Evgeny Yakovlev 5f2585772f virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised
Virtio spec 1.1 (and earlier), 5.2.5.2 Driver Requirements: Device
Initialization:

"Devices SHOULD always offer VIRTIO_BLK_F_FLUSH, and MUST offer it if
they offer VIRTIO_BLK_F_CONFIG_WCE"

Currently F_CONFIG_WCE and F_WCE are not connected to each other.
Qemu will advertise F_CONFIG_WCE if config-wce argument is
set for virtio-blk device. And F_WCE is advertised only if
underlying block backend actually has it's caching enabled.

Fix this by advertising F_WCE if F_CONFIG_WCE is also advertised.

To preserve backwards compatibility with newer machine types make this
behaviour governed by "x-enable-wce-if-config-wce" virtio-blk-device
property and introduce hw_compat_4_2 with new property being off by
default for all machine types <= 4.2 (but don't introduce 4.3
machine type itself yet).

Signed-off-by: Evgeny Yakovlev <wrfsh@yandex-team.ru>
Message-Id: <1572978137-189218-1-git-send-email-wrfsh@yandex-team.ru>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-12-13 11:22:06 +00:00
..
dataplane virtio-blk: Cancel the pending BH when the dataplane is reset 2019-09-03 16:11:18 +01:00
block.c pflash: Require backend size to match device, improve errors 2019-03-26 08:16:24 +01:00
cdrom.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
ecc.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
fdc.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
hd-geometry.c block: Remove blk_pread_unthrottled() 2019-08-16 10:25:16 +02:00
Kconfig hw/m68k: add a dummy SWIM floppy controller 2019-10-28 19:06:51 +01:00
m25p80.c m25p80: Add support for w25q512jv 2019-10-15 18:09:05 +01:00
Makefile.objs hw/m68k: add a dummy SWIM floppy controller 2019-10-28 19:06:51 +01:00
nand.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
nvme.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
nvme.h nvme: add Get/Set Feature Timestamp support 2019-06-04 15:22:09 +02:00
onenand.c Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
pflash_cfi01.c hw/block/pflash: Remove dynamic field width from trace events 2019-11-19 14:45:58 +01:00
pflash_cfi02.c hw/block/pflash: Remove dynamic field width from trace events 2019-11-19 14:45:58 +01:00
swim.c hw/m68k: add a dummy SWIM floppy controller 2019-10-28 19:06:51 +01:00
tc58128.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
trace-events hw/block/pflash: Remove dynamic field width from trace events 2019-11-19 14:45:58 +01:00
vhost-user-blk.c vhost-user-blk: prevent using uninitialized vqs 2019-09-16 06:27:35 -04:00
virtio-blk.c virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised 2019-12-13 11:22:06 +00:00
xen_blkif.h xen: Import other xen/io/*.h 2019-06-24 10:42:30 +01:00
xen-block.c xen-block: treat XenbusStateUnknown the same as XenbusStateClosed 2019-09-24 12:21:11 +01:00