diff options
author | Evgeny Yakovlev <wrfsh@yandex-team.ru> | 2019-11-05 21:22:17 +0300 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2019-12-13 11:22:06 +0000 |
commit | 5f2585772fff7ada93cb6691c51603451228a09c (patch) | |
tree | 65858f3bf90fecbf987a9364ad1cea6fad0ca91c /hw/i386/pc_q35.c | |
parent | b0ca999a43a22b38158a222233d3f5881648bb4f (diff) | |
download | qemu-5f2585772fff7ada93cb6691c51603451228a09c.zip qemu-5f2585772fff7ada93cb6691c51603451228a09c.tar.gz qemu-5f2585772fff7ada93cb6691c51603451228a09c.tar.bz2 |
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>
Diffstat (limited to 'hw/i386/pc_q35.c')
-rw-r--r-- | hw/i386/pc_q35.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 385e5cf..2608cd0 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -354,6 +354,7 @@ static void pc_q35_4_2_machine_options(MachineClass *m) pc_q35_machine_options(m); m->alias = "q35"; pcmc->default_cpu_version = 1; + compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); } DEFINE_Q35_MACHINE(v4_2, "pc-q35-4.2", NULL, |