xsm: fix clang 3.5 build after c47d1d

The changes introduced on c47d1d broke the clang build due to undefined
references to __xsm_action_mismatch_detected, because clang hasn't optimized
the code properly. The following patch allows the clang build to work again,
while keeping the same functionality.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2017-04-10 17:31:42 +02:00
1 parent ce70926b4f
commit 3ceaf2e5a2
1 file changed
+6 -10
+6 -10
View File
@@ -557,25 +557,21 @@ static XSM_INLINE int xsm_hvm_param_altp2mhvm(XSM_DEFAULT_ARG struct domain *d)
static XSM_INLINE int xsm_hvm_altp2mhvm_op(XSM_DEFAULT_ARG struct domain *d, uint64_t mode, uint32_t op)
{
xsm_default_t a;
XSM_ASSERT_ACTION(XSM_OTHER);
switch ( mode )
{
case XEN_ALTP2M_mixed:
a = XSM_TARGET;
break;
return xsm_default_action(XSM_TARGET, current->domain, d);
case XEN_ALTP2M_external:
a = XSM_DM_PRIV;
break;
return xsm_default_action(XSM_DM_PRIV, current->domain, d);
case XEN_ALTP2M_limited:
a = (HVMOP_altp2m_vcpu_enable_notify == op) ? XSM_TARGET : XSM_DM_PRIV;
break;
if ( HVMOP_altp2m_vcpu_enable_notify == op )
return xsm_default_action(XSM_TARGET, current->domain, d);
return xsm_default_action(XSM_DM_PRIV, current->domain, d);
default:
return -EPERM;
};
return xsm_default_action(a, current->domain, d);
}
}
static XSM_INLINE int xsm_vm_event_control(XSM_DEFAULT_ARG struct domain *d, int mode, int op)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.