aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/sched.h
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-10-15 16:51:44 +0100
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-10-15 16:51:44 +0100
commit02be82737e0659e231d0be71d5d5de1081cef295 (patch)
tree59f56bffaf4b8e06989a68de93e0049e36fe6dc7 /xen/include/xen/sched.h
parent8bf7206904251db928f085caa8ef92c41cea656d (diff)
downloadxen-02be82737e0659e231d0be71d5d5de1081cef295.tar.gz
xen-02be82737e0659e231d0be71d5d5de1081cef295.tar.bz2
xen-02be82737e0659e231d0be71d5d5de1081cef295.zip
xen: Add versions of rcu_lock_*_domain without IS_PRIV
These functions will be used to avoid duplication of IS_PRIV calls that will be introduced in XSM hooks. This also fixes a build error with XSM enabled introduced by 25925:d1c3375c3f11 which depends on this patch. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/sched.h')
-rw-r--r--xen/include/xen/sched.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index 53804c87d5..b0def4a424 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -447,6 +447,11 @@ struct domain *domain_create(
struct domain *rcu_lock_domain_by_id(domid_t dom);
/*
+ * As above function, but resolves DOMID_SELF to current domain
+ */
+struct domain *rcu_lock_domain_by_any_id(domid_t dom);
+
+/*
* As above function, but accounts for current domain context:
* - Translates target DOMID_SELF into caller's domain id; and
* - Checks that caller has permission to act on the target domain.
@@ -460,6 +465,12 @@ int rcu_lock_target_domain_by_id(domid_t dom, struct domain **d);
*/
int rcu_lock_remote_target_domain_by_id(domid_t dom, struct domain **d);
+/*
+ * As rcu_lock_domain_by_id(), but will fail EPERM or ESRCH rather than resolve
+ * to local domain.
+ */
+int rcu_lock_remote_domain_by_id(domid_t dom, struct domain **d);
+
/* Finish a RCU critical region started by rcu_lock_domain_by_id(). */
static inline void rcu_unlock_domain(struct domain *d)
{