On 09.02.2022 13:42, Julien Grall wrote: > On 27/01/2022 07:49, Penny Zheng wrote: >> --- a/xen/arch/x86/domain.c >> +++ b/xen/arch/x86/domain.c >> @@ -722,7 +722,8 @@ static bool emulation_flags_ok(const struct domain *d, >> uint32_t emflags) >> } >> >> int arch_domain_create(struct domain *d, >> - struct xen_domctl_createdomain *config) >> + struct xen_domctl_createdomain *config, >> + unsigned int flags) > > Shouldn't we return an error if the flag CDF_directmap is on x86? The > other alternative is to...
Hmm, maybe rather assert that the flag is not set? But ... >> --- a/xen/include/xen/domain.h >> +++ b/xen/include/xen/domain.h >> @@ -31,6 +31,8 @@ void arch_get_domain_info(const struct domain *d, >> /* CDF_* constant. Internal flags for domain creation. */ >> /* Is this a privileged domain? */ >> #define CDF_privileged (1U << 0) >> +/* Should domain memory be directly mapped? */ >> +#define CDF_directmap (1U << 1) > > ... protect this with #ifdef CONFIG_ARM. ... I don't mind an #ifdef here, apart from the general concern over CONFIG_<arch> uses in common code. Jan