summaryrefslogtreecommitdiff
path: root/kvm_x86.h
diff options
context:
space:
mode:
authorMax Bruning <max@joyent.com>2011-08-01 07:28:04 -0700
committerMax Bruning <max@joyent.com>2011-08-01 07:29:42 -0700
commit8d3d4a53bb8de182a3686485ee6a0f6acaa8c3e4 (patch)
tree1b27676be896bb1cd8be66fac84f4c8c840815ff /kvm_x86.h
parentd158c438dca2eb7ee01426c87daa76fc4ea2a335 (diff)
downloadillumos-kvm-8d3d4a53bb8de182a3686485ee6a0f6acaa8c3e4.tar.gz
HVM-538 Implement smp_rmb/smp_wmb in kvm
Diffstat (limited to 'kvm_x86.h')
-rw-r--r--kvm_x86.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/kvm_x86.h b/kvm_x86.h
index af6a38b..bbe2daf 100644
--- a/kvm_x86.h
+++ b/kvm_x86.h
@@ -274,4 +274,12 @@ typedef struct kvm_vcpu_events {
0; \
})
+/*
+ * The following should provide an optimization barrier.
+ * If the system does reorder loads and stores, this needs to be changed.
+ */
+
+#define smp_wmb() __asm__ __volatile__("" ::: "memory")
+#define smp_rmb() __asm__ __volatile__("" ::: "memory")
+
#endif /* __KVM_X86_H */