qemu-e2k/include/hw
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
..
acpi aio / timers: Switch entire codebase to the new timer API 2013-08-22 19:14:24 +02:00
arm hw/arm/pic_cpu: Remove the now-unneeded arm_pic_init_cpu() 2013-08-20 14:54:31 +01:00
audio
block
char lm32_juart: QOM cast cleanup 2013-07-29 21:06:28 +02:00
cpu
cris
i2c
i386 e1000: add interrupt mitigation support 2013-09-06 17:25:52 +02:00
input
isa isa: Fix documentation of isa_register_portio_list() 2013-08-30 21:15:44 +02:00
kvm
lm32 lm32_juart: Relocate and tidy header 2013-07-29 21:06:27 +02:00
m68k
mips hw/mips: align initrd to 64KB to avoid kernel error 2013-07-29 00:27:35 +02:00
misc
nvram
pci pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
pci-host spapr-pci: rework MSI/MSIX 2013-09-02 10:06:42 +02:00
ppc pseries: Add H_SET_MODE hcall to change guest exception endianness 2013-09-02 10:06:42 +02:00
s390x
scsi scsi: Pass size to scsi_bus_new() 2013-08-30 20:14:39 +02:00
sh4
sparc
timer m48t59: QOM cast cleanup for M48t59SysBusState 2013-07-29 21:07:01 +02:00
unicore32
virtio virtio-blk: do not relay a previous driver's WCE configuration to the current 2013-09-20 19:27:48 +02:00
xen pc: Initializing ram_memory under Xen. 2013-09-09 16:22:19 +00:00
boards.h hw: Clean up bogus default boot order 2013-08-28 10:16:47 +03:00
bt.h Preparation for usb-bt-dongle conditional build 2013-09-10 11:14:41 +02:00
devices.h
elf_ops.h
empty_slot.h
hw.h
ide.h
irq.h
loader.h loader: store FW CFG ROM files in RAM 2013-08-21 00:18:39 +03:00
pcmcia.h
ptimer.h
qdev-core.h qdev: Pass size to qbus_create_inplace() 2013-08-30 21:15:35 +02:00
qdev-dma.h
qdev-properties.h qdev: Add SIZE type to qdev properties 2013-07-29 19:33:33 -05:00
qdev.h
sd.h
ssi.h
stream.h
sysbus.h sysbus: QOM parent field cleanup for SysBusDevice 2013-07-29 21:07:03 +02:00
usb.h Remove dev-bluetooth.c dependency from vl.c 2013-09-10 11:14:42 +02:00
xilinx.h