On 20.06.2022 04:44, Penny Zheng wrote: > --- a/xen/include/xen/domain.h > +++ b/xen/include/xen/domain.h > @@ -35,6 +35,18 @@ void arch_get_domain_info(const struct domain *d, > /* Should domain memory be directly mapped? */ > #define CDF_directmap (1U << 1) > #endif > +/* Is domain memory on static allocation? */ > +#ifdef CONFIG_STATIC_MEMORY > +#define CDF_staticmem (1U << 2) > +#else > +#define CDF_staticmem 0 > +#endif
With this do you really need ... > +#ifdef CONFIG_STATIC_MEMORY > +#define is_domain_using_staticmem(d) ((d)->cdf & CDF_staticmem) > +#else > +#define is_domain_using_staticmem(d) ((void)(d), false) > +#endif ... the #ifdef-ary here anymore? Jan