[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 8/8] kvm-all.c: define smp_wmb and use it for coales
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 8/8] kvm-all.c: define smp_wmb and use it for coalesced mmio |
Date: |
Mon, 22 Feb 2010 18:26:50 -0300 |
Acked-by: "Michael S. Tsirkin" <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
Signed-off-by: Avi Kivity <address@hidden>
---
kvm-all.c | 3 ++-
qemu-barrier.h | 7 +++++++
2 files changed, 9 insertions(+), 1 deletions(-)
create mode 100644 qemu-barrier.h
diff --git a/kvm-all.c b/kvm-all.c
index 91d3cbd..1a02076 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -21,6 +21,7 @@
#include <linux/kvm.h>
#include "qemu-common.h"
+#include "qemu-barrier.h"
#include "sysemu.h"
#include "hw/hw.h"
#include "gdbstub.h"
@@ -730,7 +731,7 @@ void kvm_flush_coalesced_mmio_buffer(void)
ent = &ring->coalesced_mmio[ring->first];
cpu_physical_memory_write(ent->phys_addr, ent->data, ent->len);
- /* FIXME smp_wmb() */
+ smp_wmb();
ring->first = (ring->first + 1) % KVM_COALESCED_MMIO_MAX;
}
}
diff --git a/qemu-barrier.h b/qemu-barrier.h
new file mode 100644
index 0000000..3bd1075
--- /dev/null
+++ b/qemu-barrier.h
@@ -0,0 +1,7 @@
+#ifndef __QEMU_BARRIER_H
+#define __QEMU_BARRIER_H 1
+
+/* FIXME: arch dependant, x86 version */
+#define smp_wmb() asm volatile("" ::: "memory")
+
+#endif
--
1.6.6
- [Qemu-devel] [PATCH 0/8] [GIT PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] [PATCH 5/8] kvm specific wait_io_event, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] [PATCH 8/8] kvm-all.c: define smp_wmb and use it for coalesced mmio,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 3/8] kvm: Kill CR3_CACHE feature references, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] [PATCH 6/8] kvm: consume internal signal with sigtimedwait, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] [PATCH 7/8] kvm: remove pre-entry exit_request check with iothread enabled, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] [PATCH 4/8] block SIGCHLD in vcpu thread(s), Marcelo Tosatti, 2010/02/22
- [Qemu-devel] [PATCH 1/8] use eventfd for iothread, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] [PATCH 2/8] kvm: Fix eflags corruption in kvm mode, Marcelo Tosatti, 2010/02/22
- [Qemu-devel] Re: [PATCH 0/8] [GIT PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/02/22