qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH-RFC 0/3] qemu: memory barriers in virtio
@ 2009-12-08 16:18 Michael S. Tsirkin
  2009-12-22 11:26 ` [Qemu-devel] " Michael S. Tsirkin
       [not found] ` <200912231704.19449.rusty@rustcorp.com.au>
  0 siblings, 2 replies; 8+ messages in thread
From: Michael S. Tsirkin @ 2009-12-08 16:18 UTC (permalink / raw)
  To: qemu-devel, Anthony Liguori, Paul Brook

The following fixes a class of long-standing bugs in qemu:
when kvm is enabled, guest might access device structures
in memory while they are updated by qemu on another CPU.
In this scenario, memory barriers are necessary to prevent
host CPU from reordering memory accesses, which might confuse
the guest.

This patch only fixes virtio, but other emulated devices
might have a similar bug. They'll need to be discovered
and addressed case by case.

This is still under test ... meanwhile: any early feedback/flames?

-- 
MST


Michael S. Tsirkin (3):
  qemu: add barriers.h header
  virtio: use a real wmb
  virtio: add missing barriers

 hw/barriers.h |  131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/virtio.c   |   18 ++++----
 2 files changed, 139 insertions(+), 10 deletions(-)
 create mode 100644 hw/barriers.h

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-04  2:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 16:18 [Qemu-devel] [PATCH-RFC 0/3] qemu: memory barriers in virtio Michael S. Tsirkin
2009-12-22 11:26 ` [Qemu-devel] " Michael S. Tsirkin
2009-12-22 14:51   ` Anthony Liguori
2009-12-22 16:25     ` Paul Brook
2009-12-22 16:34       ` Michael S. Tsirkin
2009-12-22 22:58         ` Paul Brook
2009-12-22 17:28       ` Avi Kivity
     [not found] ` <200912231704.19449.rusty@rustcorp.com.au>
     [not found]   ` <20091223163600.GD6588@redhat.com>
2010-01-04  2:07     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).