aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/include/asm-x86/config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
index 23aabeb2b9..35efb1ba63 100644
--- a/xen/include/asm-x86/config.h
+++ b/xen/include/asm-x86/config.h
@@ -65,8 +65,13 @@
#define barrier() __asm__ __volatile__("": : :"memory")
+/* A power-of-two value greater than or equal to number of hypercalls. */
#define NR_hypercalls 32
+#if NR_hypercalls & (NR_hypercalls - 1)
+#error "NR_hypercalls must be a power-of-two value"
+#endif
+
#ifndef NDEBUG
#define MEMORY_GUARD
#ifdef __x86_64__