[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 01/11] xen: introduce internal CDF_xxx flags for domain creation
On 20.12.2021 06:21, Penny Zheng wrote: > From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx> > > We are passing an internal-only boolean flag at domain creation to > specify whether we want the domain to be privileged (i.e. dom0) or > not. Another flag will be introduced later in this series. > > This commit extends original "boolean" to an "unsigned int" covering both > the existing "is_priv" and our new "directmap", which will be introduced > later. > > To make visible the relationship, we name the respective constants CDF_xxx > (with no XEN_DOMCTL_ prefix) to represent the difference with the public > constants XEN_DOMCTL_CDF_xxx. > > Allocate bit 0 as CDF_privileged: whether a domain is privileged or not. > > Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx> > Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> with one remark: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -552,7 +552,7 @@ static int sanitise_domain_config(struct > xen_domctl_createdomain *config) > > struct domain *domain_create(domid_t domid, > struct xen_domctl_createdomain *config, > - bool is_priv) > + const unsigned int flags) We don't normally use const like this, so I'd suggest to drop it here and ... > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -665,7 +665,7 @@ int arch_sanitise_domain_config(struct > xen_domctl_createdomain *config); > */ > struct domain *domain_create(domid_t domid, > struct xen_domctl_createdomain *config, > - bool is_priv); > + const unsigned int flags); ... here. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |