aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/sched.h
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-05-07 16:51:19 +0200
committerJan Beulich <jbeulich@suse.com>2013-05-07 16:51:19 +0200
commit3b77afc7f3bfce1fa09b4cf3d54b4463cf4c216f (patch)
treedf6cd25cd9c00eac83c5d30cdf5e1187e3caebdf /xen/include/xen/sched.h
parentf3d7d1b2c5124d88d27a70a5f02a3c14fd169d42 (diff)
downloadxen-3b77afc7f3bfce1fa09b4cf3d54b4463cf4c216f.tar.gz
xen-3b77afc7f3bfce1fa09b4cf3d54b4463cf4c216f.tar.bz2
xen-3b77afc7f3bfce1fa09b4cf3d54b4463cf4c216f.zip
rename IS_PRIV to is_hardware_domain
Since the remaining uses of IS_PRIV are actually concerned with the domain having control of the hardware (i.e. being the initial domain), clarify this by renaming IS_PRIV to is_hardware_domain. This also removes IS_PRIV_FOR since the only remaining user was xsm/dummy.h. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> (for 4.3 release) Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/sched.h')
-rw-r--r--xen/include/xen/sched.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
index cb3baed344..5b55c09fb6 100644
--- a/xen/include/xen/sched.h
+++ b/xen/include/xen/sched.h
@@ -716,8 +716,16 @@ uint64_t get_cpu_idle_time(unsigned int cpu);
void watchdog_domain_init(struct domain *d);
void watchdog_domain_destroy(struct domain *d);
-#define IS_PRIV(_d) ((_d)->is_privileged)
-#define IS_PRIV_FOR(_d, _t) (IS_PRIV(_d) || ((_d)->target && (_d)->target == (_t)))
+/*
+ * Use this check when the following are both true:
+ * - Using this feature or interface requires full access to the hardware
+ * (that is, this is would not be suitable for a driver domain)
+ * - There is never a reason to deny dom0 access to this
+ */
+#define is_hardware_domain(_d) ((_d)->is_privileged)
+
+/* This check is for functionality specific to a control domain */
+#define is_control_domain(_d) ((_d)->is_privileged)
#define VM_ASSIST(_d,_t) (test_bit((_t), &(_d)->vm_assist))