summaryrefslogtreecommitdiff
path: root/kvm_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'kvm_x86.h')
-rw-r--r--kvm_x86.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/kvm_x86.h b/kvm_x86.h
index ff98454..a245b6f 100644
--- a/kvm_x86.h
+++ b/kvm_x86.h
@@ -256,4 +256,17 @@ typedef struct kvm_vcpu_events {
uint32_t reserved[10];
} kvm_vcpu_events_t;
+/*
+ * The following needs to run on each cpu. Currently,
+ * wait is always 1, so we use the kvm_xcall() routine which
+ * calls xc_sync. Later, if needed, the implementation can be
+ * changed to use xc_call or xc_call_nowait.
+ */
+#define on_each_cpu(func, info, wait) \
+ /*CSTYLED*/ \
+ ({ \
+ kvm_xcall(KVM_CPUALL, func, info); \
+ 0; \
+ })
+
#endif /* __KVM_X86_H */