qemu-irix/include/hw
Paolo Bonzini c8adc0db7e 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>
(cherry picked from commit ef5bc96268)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-09-24 23:03:09 -05:00
..
acpi
arm arm/boot: Allow boards to modify the FDT blob 2013-07-19 12:58:47 +01:00
audio isa: QOM'ify ISADevice 2013-06-07 14:55:33 +02:00
block
char lm32_juart: QOM cast cleanup 2013-07-29 21:06:28 +02:00
cpu
cris
i2c
i386 pc: fix regression for 64 bit PCI memory 2013-09-24 19:12:03 -05:00
input
isa isa_mmio: delete 2013-07-25 08:12:27 -05: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 fw_cfg: add API to find FW cfg object 2013-06-02 18:14:14 +03:00
pci pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types 2013-07-29 20:45:24 +02:00
pci-host pc: limit 64 bit hole to 2G by default 2013-07-29 19:33:34 -05:00
ppc xics: rename types to be sane and follow coding style 2013-07-29 10:37:09 -05:00
s390x
scsi scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline() 2013-07-23 00:37:35 +02:00
sh4
sparc firmware_abi: move to include/hw/nvram/ 2013-06-02 18:13:54 +03:00
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-24 23:03:09 -05:00
xen pc: Initializing ram_memory under Xen. 2013-09-24 22:47:03 -05:00
boards.h
bt.h
devices.h
elf_ops.h
empty_slot.h
hw.h linux-user: Fix compilation failure 2013-06-27 15:38:35 -05:00
ide.h
irq.h
loader.h hw/loader: Support ramdisk with u-boot header 2013-07-22 12:00:56 +01:00
pcmcia.h
ptimer.h
qdev-core.h qemu-help: Sort devices by logical functionality 2013-07-29 10:37:09 -05: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 usb: add serial bus property 2013-06-24 08:41:07 +02:00
xilinx.h