Statistics
| Branch: | Revision:

root / qemu-barrier.h @ 7c9958b0

History | View | Annotate | Download (1.8 kB)

# Date Author Comment
a821ce59 04/25/2012 10:53 am Michael S. Tsirkin

virtio: order index/descriptor reads

virtio has the equivalent of:

if (vq->last_avail_index != vring_avail_idx(vq)) {
read descriptor head at vq->last_avail_index;
}

In theory, processor can reorder descriptor head
read to happen speculatively before the index read....

a281ebc1 04/25/2012 10:53 am Michael S. Tsirkin

virtio: add missing mb() on notification

During normal operation, virtio first writes a used index
and then checks whether it should interrupt the guest
by reading guest avail index/flag values.

Guest does the reverse: writes the index/flag,
then checks the used ring....

463ce4ae 11/01/2011 06:50 pm Eric Sunshine

qemu-barrier: Fix build failure on PowerPC Mac OS X

qemu-barrier.h tests if macro powerpc is defined, however, the
preprocessor on PowerPC Mac OS X defines only POWERPC, not
powerpc. Resolve by testing instead for qemu-provided _ARCH_PPC.

Signed-off-by: Eric Sunshine <>...

e2251708 09/23/2011 07:51 pm David Gibson

Barriers in qemu-barrier.h should not be x86 specific

qemu-barrier.h contains a few macros implementing memory barrier
primitives used in several places throughout qemu. However, apart
from the compiler-only barrier, the defined wmb() is correct only for...

1d93f0f0 07/22/2010 06:52 am Jan Kiszka

Introduce proper compiler barrier

Define barrier() as optimization barrier and replace (potentially
unreliable) asm("") fences.

Signed-off-by: Jan Kiszka <>
Acked-by: Paolo Bonzini <>
Reviewed-by: Marcelo Tosatti <>...

85199474 02/22/2010 07:04 pm Marcelo Tosatti

kvm-all.c: define smp_wmb and use it for coalesced mmio

Acked-by: "Michael S. Tsirkin" <>
Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>