[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH V5 10/15] evtchn: update Xen public header xen.h



Document limits of 2/3-level event channel ABIs.

Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 xen/include/public/xen.h |   13 ++++++++++++-
 xen/include/xen/sched.h  |    2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index ba9e1ab..e6c33d4 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -554,9 +554,20 @@ DEFINE_XEN_GUEST_HANDLE(multicall_entry_t);
 
 /*
  * Event channel endpoints per domain:
+ * 2-level for x86:
  *  1024 if a long is 32 bits; 4096 if a long is 64 bits.
+ * 3-level for x86:
+ *  32k if a long is 32 bits; 256k if a long is 64 bits.
+ * 2-level for ARM:
+ *  4096 for both 32 bits and 64 bits.
+ * 3-level for ARM:
+ *  256k for both 32 bits and 64 bits.
  */
-#define NR_EVENT_CHANNELS (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
+#define NR_EVENT_CHANNELS_L2 (sizeof(xen_ulong_t) * sizeof(xen_ulong_t) * 64)
+#define NR_EVENT_CHANNELS_L3 (NR_EVENT_CHANNELS_L2 * sizeof(xen_ulong_t) * 8)
+#if !defined(__XEN__) && !defined(__XEN_TOOLS__)
+#define NR_EVENT_CHANNELS NR_EVENT_CHANNELS_L2 /* for compatibility */
+#endif
 
 struct vcpu_time_info {
     /*
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index dbb7217..6bf96bd 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -56,7 +56,7 @@ extern struct domain *dom0;
  */
 #define NR_EVTCHN_GROUPS   64
 #define BUCKETS_PER_GROUP  16
-#define EVTCHNS_PER_GROUP  (NR_EVENT_CHANNELS / NR_EVTCHN_GROUPS)
+#define EVTCHNS_PER_GROUP  (NR_EVENT_CHANNELS_L3 / NR_EVTCHN_GROUPS)
 #define EVTCHNS_PER_BUCKET (EVTCHNS_PER_GROUP / BUCKETS_PER_GROUP)
 
 struct evtchn
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.