On 25.02.2021 16:24, Connor Davis wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -501,7 +501,9 @@ static int sanitise_domain_config(struct 
> xen_domctl_createdomain *config)
>              return -EINVAL;
>          }
>  
> +#ifdef CONFIG_HAS_PASSTHROUGH
>          if ( !iommu_enabled )
> +#endif
>          {
>              dprintk(XENLOG_INFO, "IOMMU requested but not available\n");
>              return -EINVAL;

Where possible - to avoid such #ifdef-ary - the symbol instead should
get #define-d to a sensible value ("false" in this case) in the header.
The other cases here may indeed need to remain as you have them.

Jan

Reply via email to