aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/hvm.c
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-01-11 10:44:01 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-01-11 10:44:01 +0000
commit0d7f18b01f69c6b89aa3654bd2b11e24f41aaf71 (patch)
treeb617ea3a23d5091d2c272423a36bbcb69dff24c9 /xen/arch/x86/hvm/hvm.c
parentfcb8baddf00e0034ef382eef8f3f11bf1330c14e (diff)
downloadxen-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/hvm/hvm.c')
-rw-r--r--xen/arch/x86/hvm/hvm.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index e17b7356de..b5d795ae41 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -3396,7 +3396,7 @@ static int hvmop_set_pci_intx_level(
if ( !is_hvm_domain(d) )
goto out;
- rc = xsm_hvm_set_pci_intx_level(d);
+ rc = xsm_hvm_set_pci_intx_level(XSM_DM_PRIV, d);
if ( rc )
goto out;
@@ -3563,7 +3563,7 @@ static int hvmop_set_isa_irq_level(
if ( !is_hvm_domain(d) )
goto out;
- rc = xsm_hvm_set_isa_irq_level(d);
+ rc = xsm_hvm_set_isa_irq_level(XSM_DM_PRIV, d);
if ( rc )
goto out;
@@ -3607,7 +3607,7 @@ static int hvmop_set_pci_link_route(
if ( !is_hvm_domain(d) )
goto out;
- rc = xsm_hvm_set_pci_link_route(d);
+ rc = xsm_hvm_set_pci_link_route(XSM_DM_PRIV, d);
if ( rc )
goto out;
@@ -3637,7 +3637,7 @@ static int hvmop_inject_msi(
if ( !is_hvm_domain(d) )
goto out;
- rc = xsm_hvm_inject_msi(d);
+ rc = xsm_hvm_inject_msi(XSM_DM_PRIV, d);
if ( rc )
goto out;
@@ -3734,7 +3734,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( !is_hvm_domain(d) )
goto param_fail;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail;
@@ -3983,7 +3983,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( a.nr > GB(1) >> PAGE_SHIFT )
goto param_fail2;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail2;
@@ -4021,7 +4021,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( !is_hvm_domain(d) )
goto param_fail3;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail3;
@@ -4082,7 +4082,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( d == NULL )
return -ESRCH;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail_getmemtype;
@@ -4136,7 +4136,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( !is_hvm_domain(d) )
goto param_fail4;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail4;
@@ -4229,7 +4229,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( !is_hvm_domain(d) )
goto param_fail5;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail5;
@@ -4264,7 +4264,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( !is_hvm_domain(d) )
goto param_fail6;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail6;
@@ -4300,7 +4300,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( !is_hvm_domain(d) || !paging_mode_shadow(d) )
goto param_fail7;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail7;
@@ -4354,7 +4354,7 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
if ( !is_hvm_domain(d) )
goto param_fail8;
- rc = xsm_hvm_param(d, op);
+ rc = xsm_hvm_param(XSM_TARGET, d, op);
if ( rc )
goto param_fail8;