[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH v2 17/26] xen/domctl: wrap xsm_set_target() with CONFIG_MGMT_HYPERCALLS
[Public] > -----Original Message----- > From: Jan Beulich <jbeulich@xxxxxxxx> > Sent: Thursday, September 11, 2025 7:34 PM > To: Penny, Zheng <penny.zheng@xxxxxxx> > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Huang, Ray <Ray.Huang@xxxxxxx>; Daniel > P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>; Stefano Stabellini > <sstabellini@xxxxxxxxxx> > Subject: Re: [PATCH v2 17/26] xen/domctl: wrap xsm_set_target() with > CONFIG_MGMT_HYPERCALLS > > On 11.09.2025 04:37, Stefano Stabellini wrote: > > On Wed, 10 Sep 2025, Penny Zheng wrote: > >> Function xsm_set_target() is only invoked under XEN_DOMCTL_set_target > >> domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS. > >> > >> Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx> > >> --- > >> v1 -> v2: > >> - adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS" > >> --- > >> xen/include/xsm/xsm.h | 6 +++++- > >> xen/xsm/dummy.c | 2 +- > >> xen/xsm/flask/hooks.c | 4 ++-- > >> 3 files changed, 8 insertions(+), 4 deletions(-) > > > > No change to domctl.c ? > Use in-function #ifdef-else, like ... > > >> --- a/xen/include/xsm/xsm.h > >> +++ b/xen/include/xsm/xsm.h > >> @@ -59,8 +59,8 @@ struct xsm_ops { > >> #ifdef CONFIG_MGMT_HYPERCALLS > >> int (*domctl_scheduler_op)(struct domain *d, int op); > >> int (*sysctl_scheduler_op)(int op); -#endif > >> int (*set_target)(struct domain *d, struct domain *e); > >> +#endif > >> int (*domctl)(struct domain *d, unsigned int cmd, uint32_t ssidref); > >> int (*sysctl)(int cmd); > >> int (*readconsole)(uint32_t clear); @@ -258,7 +258,11 @@ static > >> inline int xsm_sysctl_scheduler_op(xsm_default_t def, int cmd) > >> static inline int xsm_set_target( > >> xsm_default_t def, struct domain *d, struct domain *e) { > >> +#ifdef CONFIG_MGMT_HYPERCALLS > >> return alternative_call(xsm_ops.set_target, d, e); > >> +#else > >> + return -EOPNOTSUPP; > >> +#endif > >> } > > Again I would have expected for this inline function to be wrapped as a > whole; the > title says exactly that, imo. > ... could avoid adding in-place stub in domctl.c. That's my original intent. But, as jan said in other similar commits, it will leave unreachable codes when MGMT_HYPERCALLS=n. The whole inline function must be wrapped as a whole. > Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |