diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-11 10:44:01 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-11 10:44:01 +0000 |
commit | 0d7f18b01f69c6b89aa3654bd2b11e24f41aaf71 (patch) | |
tree | b617ea3a23d5091d2c272423a36bbcb69dff24c9 /xen/common/event_channel.c | |
parent | fcb8baddf00e0034ef382eef8f3f11bf1330c14e (diff) | |
download | xen-0d7f18b01f69c6b89aa3654bd2b11e24f41aaf71.tar.gz xen-0d7f18b01f69c6b89aa3654bd2b11e24f41aaf71.tar.bz2 xen-0d7f18b01f69c6b89aa3654bd2b11e24f41aaf71.zip |
xen/xsm: Add xsm_default parameter to XSM hooks
Include the default XSM hook action as the first argument of the hook
to facilitate quick understanding of how the call site is expected to
be used (dom0-only, arbitrary guest, or device model). This argument
does not solely define how a given hook is interpreted, since any
changes to the hook's default action need to be made identically to
all callers of a hook (if there are multiple callers; most hooks only
have one), and may also require changing the arguments of the hook.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/event_channel.c')
-rw-r--r-- | xen/common/event_channel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index f620966ce2..2d7afc9e2b 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -175,7 +175,7 @@ static long evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc) ERROR_EXIT_DOM(port, d); chn = evtchn_from_port(d, port); - rc = xsm_evtchn_unbound(d, chn, alloc->remote_dom); + rc = xsm_evtchn_unbound(XSM_TARGET, d, chn, alloc->remote_dom); if ( rc ) goto out; @@ -231,7 +231,7 @@ static long evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind) (rchn->u.unbound.remote_domid != ld->domain_id) ) ERROR_EXIT_DOM(-EINVAL, rd); - rc = xsm_evtchn_interdomain(ld, lchn, rd, rchn); + rc = xsm_evtchn_interdomain(XSM_HOOK, ld, lchn, rd, rchn); if ( rc ) goto out; @@ -580,7 +580,7 @@ int evtchn_send(struct domain *d, unsigned int lport) return -EINVAL; } - ret = xsm_evtchn_send(ld, lchn); + ret = xsm_evtchn_send(XSM_HOOK, ld, lchn); if ( ret ) goto out; @@ -812,7 +812,7 @@ static long evtchn_status(evtchn_status_t *status) chn = evtchn_from_port(d, port); - rc = xsm_evtchn_status(d, chn); + rc = xsm_evtchn_status(XSM_TARGET, d, chn); if ( rc ) goto out; @@ -954,7 +954,7 @@ static long evtchn_reset(evtchn_reset_t *r) if ( d == NULL ) return -ESRCH; - rc = xsm_evtchn_reset(current->domain, d); + rc = xsm_evtchn_reset(XSM_TARGET, current->domain, d); if ( rc ) goto out; @@ -1101,7 +1101,7 @@ int alloc_unbound_xen_event_channel( goto out; chn = evtchn_from_port(d, port); - rc = xsm_evtchn_unbound(d, chn, remote_domid); + rc = xsm_evtchn_unbound(XSM_TARGET, d, chn, remote_domid); chn->state = ECS_UNBOUND; chn->xen_consumer = get_xen_consumer(notification_fn); |