qemu/hw/core
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
..
bus.c
cpu.c
empty_slot.c
fw-path-provider.c
generic-loader.c
hotplug.c
irq.c
Kconfig
loader-fit.c
loader.c
machine-hmp-cmds.c
machine-qmp-cmds.c
machine.c virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised 2019-12-13 11:22:06 +00:00
Makefile.objs
nmi.c
null-machine.c
numa.c numa: Add missing \n to error message 2019-11-12 10:34:23 +01:00
or-irq.c
platform-bus.c
ptimer.c
qdev-fw.c
qdev-properties-system.c
qdev-properties.c
qdev.c
register.c
reset.c
split-irq.c
stream.c
sysbus.c
trace-events
uboot_image.h
vm-change-state-handler.c