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/sysctl.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/sysctl.c')
-rw-r--r-- | xen/common/sysctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c index 2ebf5e64cc..d663ed7430 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -40,7 +40,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) if ( op->interface_version != XEN_SYSCTL_INTERFACE_VERSION ) return -EACCES; - ret = xsm_sysctl(op->cmd); + ret = xsm_sysctl(XSM_PRIV, op->cmd); if ( ret ) return ret; @@ -57,7 +57,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) switch ( op->cmd ) { case XEN_SYSCTL_readconsole: - ret = xsm_readconsole(op->u.readconsole.clear); + ret = xsm_readconsole(XSM_HOOK, op->u.readconsole.clear); if ( ret ) break; @@ -87,7 +87,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) if ( num_domains == op->u.getdomaininfolist.max_domains ) break; - ret = xsm_getdomaininfo(d); + ret = xsm_getdomaininfo(XSM_HOOK, d); if ( ret ) continue; @@ -186,7 +186,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) uint32_t *status, *ptr; unsigned long pfn; - ret = xsm_page_offline(op->u.page_offline.cmd); + ret = xsm_page_offline(XSM_HOOK, op->u.page_offline.cmd); if ( ret ) break; |