With alternative_call() capable of handling compound types, the three
remaining hooks can be optimised at boot time too.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Daniel De Graaf <dgdegra@tycho.nsa.gov>
CC: Daniel Smith <dpsmith@apertussolutions.com>
I'm on the fence as to whether to declare this as fixing "xsm: convert xsm_ops
hook calls to alternative call"
---
xen/include/xsm/xsm.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 0b360e1a3553..82458066f625 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -579,13 +579,13 @@ static inline int xsm_hypfs_op(xsm_default_t def)
static inline long xsm_do_xsm_op(XEN_GUEST_HANDLE_PARAM(void) op)
{
- return xsm_ops.do_xsm_op(op);
+ return alternative_call(xsm_ops.do_xsm_op, op);
}
#ifdef CONFIG_COMPAT
static inline int xsm_do_compat_op(XEN_GUEST_HANDLE_PARAM(void) op)
{
- return xsm_ops.do_compat_op(op);
+ return alternative_call(xsm_ops.do_compat_op, op);
}
#endif
@@ -698,7 +698,7 @@ static inline int xsm_mmuext_op(
static inline int xsm_update_va_mapping(
xsm_default_t def, struct domain *d, struct domain *f, l1_pgentry_t pte)
{
- return xsm_ops.update_va_mapping(d, f, pte);
+ return alternative_call(xsm_ops.update_va_mapping, d, f, pte);
}
static inline int xsm_priv_mapping(
--
2.11.0
On 05.11.2021 14:55, Andrew Cooper wrote: > With alternative_call() capable of handling compound types, the three > remaining hooks can be optimised at boot time too. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
On 05.11.2021 14:55, Andrew Cooper wrote: > With alternative_call() capable of handling compound types, the three > remaining hooks can be optimised at boot time too. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> > --- > CC: Daniel De Graaf <dgdegra@tycho.nsa.gov> > CC: Daniel Smith <dpsmith@apertussolutions.com> > > I'm on the fence as to whether to declare this as fixing "xsm: convert xsm_ops > hook calls to alternative call" Forgot to say a word on this: I'd consider Fixes: appropriate, as the commit's description says nothing about these having been left out, nor why. Jan
On 08/11/2021 09:11, Jan Beulich wrote: > On 05.11.2021 14:55, Andrew Cooper wrote: >> With alternative_call() capable of handling compound types, the three >> remaining hooks can be optimised at boot time too. >> >> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> >> --- >> CC: Daniel De Graaf <dgdegra@tycho.nsa.gov> >> CC: Daniel Smith <dpsmith@apertussolutions.com> >> >> I'm on the fence as to whether to declare this as fixing "xsm: convert xsm_ops >> hook calls to alternative call" > Forgot to say a word on this: I'd consider Fixes: appropriate, as the > commit's description says nothing about these having been left out, > nor why. Ok. I'll insert one. ~Andrew
On 11/5/21 9:55 AM, Andrew Cooper wrote: > With alternative_call() capable of handling compound types, the three > remaining hooks can be optimised at boot time too. > > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> > --- > CC: Daniel De Graaf <dgdegra@tycho.nsa.gov> > CC: Daniel Smith <dpsmith@apertussolutions.com> > > I'm on the fence as to whether to declare this as fixing "xsm: convert xsm_ops > hook calls to alternative call" I don't know about fixing but completing was accurate. I am fairly certain in one of the incarnations of the patch set there was a comment identifying that these were left remaining since compound types were not supported by altcall. Regardless, Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com> v/r, dps
© 2016 - 2026 Red Hat, Inc.