Skip to content

qemu: memory barriers in virtio

Michael S. Tsirkin qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH-RFC 0/3] qemu: memory barriers in virtio

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?

Signature · 12 lines
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