aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/event.h
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-29 13:48:41 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-29 13:48:41 +0000
commit88683bd3730236b9b15afa602514a93691432870 (patch)
tree09c9e61e8884c59d97b596408e6f21ae2e61f520 /xen/include/xen/event.h
parent42d446c595a99c0a57b3b597dd679da8b2e4ce74 (diff)
downloadxen-88683bd3730236b9b15afa602514a93691432870.tar.gz
xen-88683bd3730236b9b15afa602514a93691432870.tar.bz2
xen-88683bd3730236b9b15afa602514a93691432870.zip
xsm: expose context of event channel peers
This hypercall allows a domain to identify the security context of a domain that it is communicating with using the interdomain event channel that it is using for the communication. This can be used to augment Xen's security permissions with intra-domain security checks. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/event.h')
-rw-r--r--xen/include/xen/event.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 22fc6a3f3d..11a639adff 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -70,6 +70,16 @@ int guest_enabled_event(struct vcpu *v, uint32_t virq);
/* Notify remote end of a Xen-attached event channel.*/
void notify_via_xen_event_channel(struct domain *ld, int lport);
+/* Internal event channel object accessors */
+#define bucket_from_port(d,p) \
+ ((d)->evtchn[(p)/EVTCHNS_PER_BUCKET])
+#define port_is_valid(d,p) \
+ (((p) >= 0) && ((p) < MAX_EVTCHNS(d)) && \
+ (bucket_from_port(d,p) != NULL))
+#define evtchn_from_port(d,p) \
+ (&(bucket_from_port(d,p))[(p)&(EVTCHNS_PER_BUCKET-1)])
+
+
/* Wait on a Xen-attached event channel. */
#define wait_on_xen_event_channel(port, condition) \
do { \