On 16.11.2021 07:31, Penny Zheng wrote:
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -692,6 +692,12 @@ int arch_sanitise_domain_config(struct
> xen_domctl_createdomain *config)
> return -EINVAL;
> }
>
> + if ( config->flags & XEN_DOMCTL_CDF_INTERNAL_directmap )
> + {
> + dprintk(XENLOG_INFO, "direct-map cannot be enabled yet\n");
> + return -EINVAL;
> + }
If this flag is to be retained in its present shape, then besides
rejecting it here (or perhaps instead of, with the check here simply
becoming ASSERT()) you want to reject it in the handling of
XEN_DOMCTL_createdomain, before calling domain_create(). Only then
would the flag become truly internal.
Jan