From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: [RFC PATCH V4 12/18] Update Xen public header xen.h Date: Tue, 5 Mar 2013 12:30:34 +0000 Message-ID: <1362486640-14707-13-git-send-email-wei.liu2@citrix.com> References: <1362486640-14707-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1362486640-14707-1-git-send-email-wei.liu2@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Wei Liu , keir@xen.org, ian.campbell@citrix.com, jbeulich@suse.com, david.vrabel@citrix.com List-Id: xen-devel@lists.xenproject.org Document limits of 2/3-level event channel ABIs. Also need to update event.h so that this change won't break the build. Signed-off-by: Wei Liu --- xen/include/public/xen.h | 13 ++++++++++++- xen/include/xen/event.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/event.h b/xen/include/xen/event.h index e2c3736..fa1f4b6 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -40,7 +40,7 @@ static inline unsigned int max_evtchns(struct domain *d) } #define EVTCHNS_PER_BUCKET 512 -#define NR_EVTCHN_BUCKETS (NR_EVENT_CHANNELS / EVTCHNS_PER_BUCKET) +#define NR_EVTCHN_BUCKETS (NR_EVENT_CHANNELS_L3 / EVTCHNS_PER_BUCKET) struct evtchn { -- 1.7.10.4