aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/event_channel.c
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-29 13:46:32 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-29 13:46:32 +0000
commitb34f2c375070e72b634e59c763716b9aa40d83c8 (patch)
tree84d4df4722bc4e6af998a9e431c3d8b30bff0b47 /xen/common/event_channel.c
parentc5d88f34ce6f252120936fbaed9a337829f4148a (diff)
downloadxen-b34f2c375070e72b634e59c763716b9aa40d83c8.tar.gz
xen-b34f2c375070e72b634e59c763716b9aa40d83c8.tar.bz2
xen-b34f2c375070e72b634e59c763716b9aa40d83c8.zip
xsm: label xen-consumer event channels
Event channels created during the domain build process for HVM domains did not call the XSM creation hook. Since these channels are used internally by Xen, redirect them to DOMAIN_INVAID instead of failing to create if the XSM hook fails the permissions check. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/event_channel.c')
-rw-r--r--xen/common/event_channel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c
index 989ebae133..c69d2c753e 100644
--- a/xen/common/event_channel.c
+++ b/xen/common/event_channel.c
@@ -1105,7 +1105,7 @@ int alloc_unbound_xen_event_channel(
{
struct evtchn *chn;
struct domain *d = local_vcpu->domain;
- int port;
+ int port, rc;
spin_lock(&d->event_lock);
@@ -1113,10 +1113,12 @@ int alloc_unbound_xen_event_channel(
goto out;
chn = evtchn_from_port(d, port);
+ rc = xsm_evtchn_unbound(d, chn, remote_domid);
+
chn->state = ECS_UNBOUND;
chn->xen_consumer = get_xen_consumer(notification_fn);
chn->notify_vcpu_id = local_vcpu->vcpu_id;
- chn->u.unbound.remote_domid = remote_domid;
+ chn->u.unbound.remote_domid = !rc ? remote_domid : DOMID_INVALID;
out:
spin_unlock(&d->event_lock);