summaryrefslogtreecommitdiff
path: root/kvm_x86.h
diff options
context:
space:
mode:
authorMax Bruning <max@joyent.com>2011-06-14 05:09:12 -0700
committerMax Bruning <max@joyent.com>2011-06-14 05:09:12 -0700
commitf2ea4b24b0888a77328071b34cffabf7898848cf (patch)
treee90825388b56d0f5045d654d2c017f3c9c969a6f /kvm_x86.h
parentb87d98280ff1867572f4a67a7ad095a7dd3e1209 (diff)
downloadillumos-kvm-f2ea4b24b0888a77328071b34cffabf7898848cf.tar.gz
HVM-329 Implement missing pieces of vmx_fini
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 */