diff options
author | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-11 10:49:10 +0000 |
---|---|---|
committer | Daniel De Graaf <dgdegra@tycho.nsa.gov> | 2013-01-11 10:49:10 +0000 |
commit | dfb32a89d40f3a45203895c63810305daecdc420 (patch) | |
tree | 99412d03671457208f7139e2e9df7ddcfd6f7eb3 /xen/include/xsm | |
parent | a655abfd8a4bf03de9c9a8d820125be8323d64f8 (diff) | |
download | xen-dfb32a89d40f3a45203895c63810305daecdc420.tar.gz xen-dfb32a89d40f3a45203895c63810305daecdc420.tar.bz2 xen-dfb32a89d40f3a45203895c63810305daecdc420.zip |
xen/xsm: distinguish scheduler get/set operations
Add getscheduler and setscheduler permissions to replace the
monolithic scheduler permission in the scheduler_op domctl and sysctl.
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xsm')
-rw-r--r-- | xen/include/xsm/dummy.h | 12 | ||||
-rw-r--r-- | xen/include/xsm/xsm.h | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h index 2c750de4f5..18f36b22bf 100644 --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -95,6 +95,18 @@ static XSM_INLINE int xsm_getdomaininfo(XSM_DEFAULT_ARG struct domain *d) return xsm_default_action(action, current->domain, d); } +static XSM_INLINE int xsm_domctl_scheduler_op(XSM_DEFAULT_ARG struct domain *d, int cmd) +{ + XSM_ASSERT_ACTION(XSM_HOOK); + return xsm_default_action(action, current->domain, d); +} + +static XSM_INLINE int xsm_sysctl_scheduler_op(XSM_DEFAULT_ARG int cmd) +{ + XSM_ASSERT_ACTION(XSM_HOOK); + return xsm_default_action(action, current->domain, NULL); +} + static XSM_INLINE int xsm_set_target(XSM_DEFAULT_ARG struct domain *d, struct domain *e) { XSM_ASSERT_ACTION(XSM_HOOK); diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index ce5ede8fac..8947372062 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -55,6 +55,8 @@ struct xsm_operations { struct xen_domctl_getdomaininfo *info); int (*domain_create) (struct domain *d, u32 ssidref); int (*getdomaininfo) (struct domain *d); + int (*domctl_scheduler_op) (struct domain *d, int op); + int (*sysctl_scheduler_op) (int op); int (*set_target) (struct domain *d, struct domain *e); int (*domctl) (struct domain *d, int cmd); int (*sysctl) (int cmd); @@ -177,6 +179,16 @@ static inline int xsm_getdomaininfo (xsm_default_t def, struct domain *d) return xsm_ops->getdomaininfo(d); } +static inline int xsm_domctl_scheduler_op (xsm_default_t def, struct domain *d, int cmd) +{ + return xsm_ops->domctl_scheduler_op(d, cmd); +} + +static inline int xsm_sysctl_scheduler_op (xsm_default_t def, int cmd) +{ + return xsm_ops->sysctl_scheduler_op(cmd); +} + static inline int xsm_set_target (xsm_default_t def, struct domain *d, struct domain *e) { return xsm_ops->set_target(d, e); |