summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2012-08-02 00:33:27 +0000
committerRobert Mustacchi <rm@joyent.com>2012-09-24 20:55:46 +0000
commit5e3b9e3a835ea9100d3abff5a09fb8d1f7600dfb (patch)
tree1b56c50678acee331d67d74cd7e0213e16b4a398
parent0e94d5f50e6db4246945a80ac7794dfc7b4592e4 (diff)
downloadillumos-kvm-5e3b9e3a835ea9100d3abff5a09fb8d1f7600dfb.tar.gz
HVM-738 smb_wmb and smb_rmb in kvm_x86.h shouldn't be visible to userland
-rw-r--r--kvm_x86.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kvm_x86.h b/kvm_x86.h
index ddf7718..b90f506 100644
--- a/kvm_x86.h
+++ b/kvm_x86.h
@@ -300,8 +300,9 @@ typedef struct kvm_vcpu_events {
* The following should provide an optimization barrier.
* If the system does reorder loads and stores, this needs to be changed.
*/
-
+#ifdef _KERNEL
#define smp_wmb() __asm__ __volatile__("" ::: "memory")
#define smp_rmb() __asm__ __volatile__("" ::: "memory")
+#endif
#endif /* __KVM_X86_H */