On 30.07.2019 11:39, Paul Durrant wrote:
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -460,6 +460,12 @@ int arch_sanitise_domain_config(struct 
> xen_domctl_createdomain *config)
>           return -EINVAL;
>       }
>   
> +    if ( config->flags & XEN_DOMCTL_CDF_hap && !hvm_hap_supported() )

The & wants to be parenthesized here.

> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -313,6 +313,13 @@ static int sanitise_domain_config(struct 
> xen_domctl_createdomain *config)
>           return -EINVAL;
>       }
>   
> +    if ( !(config->flags & XEN_DOMCTL_CDF_hvm_guest) &&
> +         config->flags & XEN_DOMCTL_CDF_hap )

Same here.

> --- a/xen/include/xen/sched.h
> +++ b/xen/include/xen/sched.h
> @@ -948,6 +948,11 @@ static inline bool is_hvm_domain(const struct domain *d)
>           evaluate_nospec(d->options & XEN_DOMCTL_CDF_hvm_guest);
>   }
>   
> +static inline bool hap_enabled(const struct domain *d)
> +{
> +    return evaluate_nospec(d->options & XEN_DOMCTL_CDF_hap);
> +}
> +
>   static inline bool is_hvm_vcpu(const struct vcpu *v)

Could this please not be placed between two closely related functions?

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to