summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */