qemu-patch-raspberry4/include
Paolo Bonzini ef5bc96268 virtio-blk: do not relay a previous driver's WCE configuration to the current
The following sequence happens:
- the SeaBIOS virtio-blk driver does not support the WCE feature, which
causes QEMU to disable writeback caching

- the Linux virtio-blk driver resets the device, finds WCE is available
but writeback caching is disabled; tells block layer to not send cache
flush commands

- the Linux virtio-blk driver sets the DRIVER_OK bit, which causes
writeback caching to be re-enabled, but the Linux virtio-blk driver does
not know of this side effect and cache flushes remain disabled

The bug is at the third step.  If the guest does know about CONFIG_WCE,
QEMU should ignore the WCE feature's state.  The guest will control the
cache mode solely using configuration space.  This change makes Linux
do flushes correctly, but Linux will keep SeaBIOS's writethrough mode.

Hence, whenever the guest is reset, the cache mode of the disk should
be reset to whatever was specified in the "-drive" option.  With this
change, the Linux virtio-blk driver finds that writeback caching is
enabled, and tells the block layer to send cache flush commands
appropriately.

Reported-by: Rusty Russell <rusty@au1.ibm.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-09-20 19:27:48 +02:00
..
block block: Error parameter for create functions 2013-09-12 10:12:48 +02:00
disas Add moxie disassembler 2013-03-23 14:25:41 +00:00
exec exec: Simplify the guest physical memory allocation hook 2013-09-12 11:45:31 -05:00
fpu softfloat: Implement uint64_to_float128 2013-01-05 10:12:50 +00:00
hw virtio-blk: do not relay a previous driver's WCE configuration to the current 2013-09-20 19:27:48 +02:00
migration migration: fix spice migration 2013-07-29 17:19:02 +02:00
monitor Merge remote-tracking branch 'kwolf/for-anthony' into staging 2013-09-03 12:32:46 -05:00
net net: Rename send_queue to incoming_queue 2013-09-06 17:01:26 +02:00
qapi error: Add error_set_win32 and error_setg_win32 2013-09-09 14:17:57 -05:00
qemu qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe 2013-09-18 15:48:33 +02:00
qom QOM CPUState refactorings / X86CPU 2013-09-03 12:33:32 -05:00
sysemu Merge remote-tracking branch 'bonzini/scsi-next' into staging 2013-09-17 09:50:23 -05:00
ui spice: fix display initialization 2013-07-30 10:25:47 +02:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h s390: Implement dump-guest-memory support for target s390x 2013-07-30 16:12:25 +02:00
glib-compat.h glib: add a compatibility interface for g_timeout_add_seconds 2013-03-25 13:10:40 -05:00
qemu-common.h qmp: add interface blockdev-snapshot-delete-internal-sync 2013-09-12 10:12:47 +02:00
qemu-io.h qemu-io: Interface cleanup 2013-06-06 11:27:05 +02:00
trace.h build: some simplifications for "trace/Makefile.objs" 2013-01-12 18:42:51 +01:00