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/arch/x86/mm | |
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/arch/x86/mm')
-rw-r--r-- | xen/arch/x86/mm/mem_event.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/mm/mem_sharing.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/mm/paging.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/xen/arch/x86/mm/mem_event.c b/xen/arch/x86/mm/mem_event.c index c2b36703f8..422224836d 100644 --- a/xen/arch/x86/mm/mem_event.c +++ b/xen/arch/x86/mm/mem_event.c @@ -449,7 +449,7 @@ int do_mem_event_op(int op, uint32_t domain, void *arg) if ( ret ) return ret; - ret = xsm_mem_event_op(d, op); + ret = xsm_mem_event_op(XSM_TARGET, d, op); if ( ret ) goto out; @@ -502,7 +502,7 @@ int mem_event_domctl(struct domain *d, xen_domctl_mem_event_op_t *mec, { int rc; - rc = xsm_mem_event_control(d, mec->mode, mec->op); + rc = xsm_mem_event_control(XSM_PRIV, d, mec->mode, mec->op); if ( rc ) return rc; diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index 46243141c4..1caa9000fc 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -1351,7 +1351,7 @@ int mem_sharing_memop(struct domain *d, xen_mem_sharing_op_t *mec) if ( rc ) return rc; - rc = xsm_mem_sharing_op(d, cd, mec->op); + rc = xsm_mem_sharing_op(XSM_TARGET, d, cd, mec->op); if ( rc ) { rcu_unlock_domain(cd); @@ -1415,7 +1415,7 @@ int mem_sharing_memop(struct domain *d, xen_mem_sharing_op_t *mec) if ( rc ) return rc; - rc = xsm_mem_sharing_op(d, cd, mec->op); + rc = xsm_mem_sharing_op(XSM_TARGET, d, cd, mec->op); if ( rc ) { rcu_unlock_domain(cd); diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index a5cdbd1f3e..ac9bb1a0ed 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -559,7 +559,7 @@ int paging_domctl(struct domain *d, xen_domctl_shadow_op_t *sc, return -EINVAL; } - rc = xsm_shadow_control(d, sc->op); + rc = xsm_shadow_control(XSM_HOOK, d, sc->op); if ( rc ) return rc; |