xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: xen-devel@lists.xen.org
Cc: david.vrabel@citrix.com, Wei Liu <wei.liu2@citrix.com>,
	ian.campbell@citrix.com, jbeulich@suse.com,
	konrad.wilk@oracle.com
Subject: [PATCH V2 05/13] xen: sync public headers
Date: Mon, 4 Feb 2013 17:23:46 +0000	[thread overview]
Message-ID: <1359998635-16866-6-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1359998635-16866-1-git-send-email-wei.liu2@citrix.com>

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 include/xen/interface/event_channel.h |   33 +++++++++++++++++++++++++++++++++
 include/xen/interface/xen.h           |    9 ++++++++-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/include/xen/interface/event_channel.h b/include/xen/interface/event_channel.h
index f494292..9d8b9e7 100644
--- a/include/xen/interface/event_channel.h
+++ b/include/xen/interface/event_channel.h
@@ -190,6 +190,39 @@ struct evtchn_reset {
 };
 typedef struct evtchn_reset evtchn_reset_t;
 
+/*
+ * EVTCHNOP_register_nlevel: Register N-level event channel
+ * NOTES:
+ *  1. Currently only 3-level is supported.
+ *  2. Should fall back to 2-level if this call fails.
+ */
+#define EVTCHNOP_register_nlevel 11
+/* 64 bit guests need 8 pages for evtchn_pending and evtchn_mask for
+ * 256k event channels while 32 bit ones only need 1 page for 32k
+ * event channels. */
+#define EVTCHN_MAX_L3_PAGES 8
+struct evtchn_register_3level {
+	/* IN parameters. */
+	uint32_t nr_pages; /* for evtchn_{pending,mask} */
+	uint32_t nr_vcpus; /* for l2sel_{mfns,mask} */
+	GUEST_HANDLE(ulong) evtchn_pending;
+	GUEST_HANDLE(ulong) evtchn_mask;
+	GUEST_HANDLE(ulong) l2sel_mfns;
+	GUEST_HANDLE(ulong) l2sel_offsets;
+};
+typedef struct evtchn_register_3level evtchn_register_3level_t;
+DEFINE_GUEST_HANDLE(evtchn_register_3level_t);
+
+struct evtchn_register_nlevel {
+	/* IN parameters. */
+	uint32_t level;
+	union {
+		evtchn_register_3level_t l3;
+	} u;
+};
+typedef struct evtchn_register_nlevel evtchn_register_nlevel_t;
+DEFINE_GUEST_HANDLE(evtchn_register_nlevel_t);
+
 struct evtchn_op {
 	uint32_t cmd; /* EVTCHNOP_* */
 	union {
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h
index a890804..5220e33 100644
--- a/include/xen/interface/xen.h
+++ b/include/xen/interface/xen.h
@@ -283,9 +283,16 @@ DEFINE_GUEST_HANDLE_STRUCT(multicall_entry);
 
 /*
  * Event channel endpoints per domain:
+ * 2-level:
  *  1024 if a long is 32 bits; 4096 if a long is 64 bits.
+ * 3-level:
+ *  32k if a long is 32 bits; 256k if a long is 64 bits.
  */
-#define NR_EVENT_CHANNELS (sizeof(unsigned long) * sizeof(unsigned long) * 64)
+#define NR_EVENT_CHANNELS_L2 (sizeof(unsigned long) * sizeof(unsigned long) * 64)
+#define NR_EVENT_CHANNELS_L3 (NR_EVENT_CHANNELS_L2 * 64)
+#if !defined(__XEN__) && !defined(__XEN_TOOLS__)
+#define NR_EVENT_CHANNELS NR_EVENT_CHANNELS_L2 /* for compatibility */
+#endif
 
 struct vcpu_time_info {
 	/*
-- 
1.7.10.4

  parent reply	other threads:[~2013-02-04 17:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-04 17:23 [PATCH V2] Implement 3-level event channel in Linux Wei Liu
2013-02-04 17:23 ` [PATCH V2 01/13] xen: add KERN_DEBUG in printk Wei Liu
2013-02-04 17:23 ` [PATCH V2 02/13] xen: fix output of xen_debug_interrupt Wei Liu
2013-02-04 17:23 ` [PATCH V2 03/13] xen: fix error handling path if xen_allocate_irq_dynamic fails Wei Liu
2013-02-04 17:23 ` [PATCH V2 04/13] xen: close evtchn port if binding to irq fails Wei Liu
2013-02-06  8:05   ` Jan Beulich
2013-02-04 17:23 ` Wei Liu [this message]
2013-02-04 17:23 ` [PATCH V2 06/13] xen: introduce test_and_set_mask Wei Liu
2013-02-04 17:23 ` [PATCH V2 07/13] xen: replace raw bit ops with functions Wei Liu
2013-02-04 17:23 ` [PATCH V2 08/13] xen: generalized event channel operations Wei Liu
2013-02-04 17:23 ` [PATCH V2 09/13] xen: dynamically allocate cpu_evtchn_mask Wei Liu
2013-02-04 17:23 ` [PATCH V2 10/13] xen: implement 3-level event channel routines Wei Liu
2013-02-04 17:23 ` [PATCH V2 11/13] xen: introduce xen_event_channel_register_3level Wei Liu
2013-02-04 17:23 ` [PATCH V2 12/13] xen: introduce xen_event_channel_register_nlevel Wei Liu
2013-02-04 17:23 ` [PATCH V2 13/13] xen: register 3-level event channel Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359998635-16866-6-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).