qemu-irix/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
..
9pfs virtio-9p-device: Avoid freeing uninitialized memory 2013-08-01 11:18:24 -05:00
acpi acpi/piix4: QOM parent field cleanup 2013-07-23 00:37:33 +02:00
alpha target-alpha: Move alarm to vm_clock 2013-07-18 06:44:55 -07:00
arm pxa2xx: Avoid object_get_link_property() assertion for "parent_bus" 2013-08-05 11:46:58 -05:00
audio adlib: sort offsets in portio registration 2013-09-24 22:11:51 -05:00
block virtio-blk: do not relay a previous driver's WCE configuration to the current 2013-09-24 23:03:09 -05:00
bt sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
char pseries: Fix stalls on hypervisor virtual console 2013-09-24 19:23:18 -05:00
core Bugfix for loading multiboot kernels 2013-08-07 12:46:40 -05:00
cpu arm11mpcore: QOM cast cleanups for mpcore_rirq_state 2013-07-29 20:44:02 +02:00
cris memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
display qxl: fix local renderer 2013-09-24 22:46:18 -05:00
dma sun4m_iommu: QOM cast cleanup 2013-07-29 21:06:46 +02:00
gpio gpio/zaurus: QOM cast cleanup 2013-07-29 21:06:57 +02:00
i2c exynos4210_i2c: QOM cast cleanup 2013-07-29 21:07:02 +02:00
i386 kvmvapic: Clear also physical ROM address when entering INACTIVE state 2013-09-24 22:54:39 -05:00
ide ide: Introduce abstract QOM type for PCIIDEState 2013-07-29 20:41:49 +02:00
input pl050: QOM'ify pl050_keyboard and pl050_mouse 2013-07-29 21:06:57 +02:00
intc ioapic: QOM cast cleanup 2013-07-29 21:07:02 +02:00
isa i82378: Cleanup implementation 2013-07-31 23:25:41 +02:00
lm32 lm32_juart: QOM cast cleanup 2013-07-29 21:06:28 +02:00
m68k memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
microblaze microblaze: Fix latent bug with default DTB lookup 2013-07-09 13:38:58 -05:00
mips mips_malta: do not raise exceptions when accessing invalid memory 2013-08-14 16:47:30 +02:00
misc hw/misc: make pvpanic known to user 2013-08-12 11:20:57 -05:00
moxie memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
net pcnet-pci: mark I/O and MMIO as LITTLE_ENDIAN 2013-09-24 22:51:04 -05:00
nvram fw_cfg: the I/O port variant expects little-endian 2013-08-07 12:48:15 -05:00
openrisc hw/openrisc: Use stderr output instead of qemu_log 2013-07-23 18:31:24 +08:00
pci pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types 2013-07-29 20:45:24 +02:00
pci-bridge i82801b11: Fix i82801b11 PCI host bridge config space 2013-08-12 12:07:12 +03:00
pci-host pc: fix regression for 64 bit PCI memory 2013-09-24 19:12:03 -05:00
ppc spapr: Rename 'dprintf' to 'DPRINTF' 2013-07-29 19:56:46 -05:00
s390x s390x: Rename 'dprintf' to 'DPRINTF' 2013-07-29 19:33:54 -05:00
scsi scsi: Fix scsi_bus_legacy_add_drive() scsi-generic with serial 2013-09-24 19:10:35 -05:00
sd pl181: QOM cast cleanup 2013-07-29 21:07:00 +02:00
sh4 sh4: unbreak r2d 2013-07-25 08:12:27 -05:00
sparc sun4m: QOM cast cleanup for RamDevice 2013-07-29 21:07:00 +02:00
sparc64 sun4u: QOM cast cleanup for RamDevice 2013-07-29 21:07:00 +02:00
ssi xilinx_spi: QOM cast cleanup 2013-07-29 21:07:01 +02:00
timer xilinx_timer: QOM cast cleanup 2013-07-29 21:07:02 +02:00
tpm hw/t*: pass owner to memory_region_init* functions 2013-07-04 17:42:48 +02:00
unicore32 memory: add owner argument to initialization functions 2013-07-04 17:42:44 +02:00
usb ehci: save device pointer in EHCIState 2013-09-24 22:45:32 -05:00
virtio virtio_pci: fix level interrupts with irqfd 2013-09-24 22:16:54 -05:00
watchdog devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
xen devices: Associate devices to their logical category 2013-07-29 10:37:09 -05:00
xtensa cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook 2013-07-23 02:41:33 +02:00
Makefile.objs virtio: simplify Makefile conditionals 2013-04-19 16:18:11 +02:00