[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is adv
Re: [PATCH] virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised
Wed, 6 Nov 2019 09:58:42 +0100
On Tue, Nov 05, 2019 at 09:22:17PM +0300, Evgeny Yakovlev wrote:
> Virtio spec 1.1 (and earlier), 188.8.131.52 Driver Requirements: Device
> "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 <address@hidden>
> hw/arm/virt.c | 1 +
> hw/block/virtio-blk.c | 6 +++++-
> hw/core/machine.c | 5 +++++
> hw/i386/pc_piix.c | 1 +
> hw/i386/pc_q35.c | 1 +
> hw/ppc/spapr.c | 2 +-
> hw/s390x/s390-virtio-ccw.c | 1 +
> include/hw/boards.h | 3 +++
> include/hw/virtio/virtio-blk.h | 1 +
> 9 files changed, 19 insertions(+), 2 deletions(-)
Thanks, applied to my block tree:
Description: PGP signature