Statistics
| Branch: | Revision:

root / qemu-barrier.h @ 9f8540ec

History | View | Annotate | Download (1.8 kB)

# Date Author Comment
f1829782 10/07/2012 09:07 pm Aurelien Jarno

qemu-barrier: Fix compilation on i386 hosts

Commit 1d31fca470648ec66afd8743491bfb5846306341 tried to fix bug
introduced by 610b823ef66b993660f1ab1447a769f190e4f3b3 by including
qemu-common.h, which breaks the build further.

Include compiler.h instead, as suggested by Blue Swirl....

1d31fca4 10/06/2012 07:49 pm Stefan Weil

qemu-barrier: Fix compilation on i386 hosts

Commit 610b823ef66b993660f1ab1447a769f190e4f3b3 uses QEMU_GNUC_PREREQ
on i386 hosts.

That macro is defined in qemu-common.h which is not always included
before qemu-barrier.h, so compilation on i386 hosts was broken....

610b823e 10/05/2012 04:00 pm Stefan Weil

qemu-barrier: Fix compiler version check for future gcc versions

The current check will give a wrong result for gcc-5.x with x < 4.
Using QEMU_GNUC_PREREQ is simpler and fixes that issue.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

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 <>