aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen
diff options
context:
space:
mode:
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>2011-12-06 20:10:32 +0000
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>2011-12-06 20:10:32 +0000
commitaf875b02aa89dd5ec79812928c75af7eb8182306 (patch)
treeb20f2d8b3635ca4bcd4a8bfdc2d69dd6c431647d /xen/include/xen
parenta85f0caca62f4909c92927f1fd671bb0cce273f2 (diff)
downloadxen-af875b02aa89dd5ec79812928c75af7eb8182306.tar.gz
xen-af875b02aa89dd5ec79812928c75af7eb8182306.tar.bz2
xen-af875b02aa89dd5ec79812928c75af7eb8182306.zip
Create a generic callback mechanism for Xen-bound event channels
For event channels for which Xen is the consumer, there currently is a single action. With this patch, we allow event channel creators to specify a generic callback (or no callback). Because the expectation is that there will be few callbacks, they are stored in a small table. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Keir Fraser <keir@xen.org> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/include/xen')
-rw-r--r--xen/include/xen/event.h5
-rw-r--r--xen/include/xen/sched.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 257cb3a5f0..7e5ad7b9d2 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -51,8 +51,11 @@ int evtchn_unmask(unsigned int port);
void evtchn_move_pirqs(struct vcpu *v);
/* Allocate/free a Xen-attached event channel port. */
+typedef void (*xen_event_channel_notification_t)(
+ struct vcpu *v, unsigned int port);
int alloc_unbound_xen_event_channel(
- struct vcpu *local_vcpu, domid_t remote_domid);
+ struct vcpu *local_vcpu, domid_t remote_domid,
+ xen_event_channel_notification_t notification_fn);
void free_xen_event_channel(
struct vcpu *local_vcpu, int port);
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 39ed2c061b..3904afe7e5 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -47,7 +47,7 @@ struct evtchn
#define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line. */
#define ECS_IPI 6 /* Channel is bound to a virtual IPI line. */
u8 state; /* ECS_* */
- u8 consumer_is_xen; /* Consumed by Xen or by guest? */
+ u8 xen_consumer; /* Consumer in Xen, if any? (0 = send to guest) */
u16 notify_vcpu_id; /* VCPU for local delivery notification */
union {
struct {