From 3b77afc7f3bfce1fa09b4cf3d54b4463cf4c216f Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Tue, 7 May 2013 16:51:19 +0200 Subject: 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 Acked-by: George Dunlap (for 4.3 release) Acked-by: Keir Fraser --- xen/include/xen/sched.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xen/include/xen/sched.h') 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)) -- cgit v1.2.3