On 23/07/2025 8:58 am, Grygorii Strashko wrote:
> diff --git a/xen/arch/arm/include/asm/arm64/domain.h 
> b/xen/arch/arm/include/asm/arm64/domain.h
> index 18402ae3ca0d..a014ab9967ac 100644
> --- a/xen/arch/arm/include/asm/arm64/domain.h
> +++ b/xen/arch/arm/include/asm/arm64/domain.h
> @@ -12,14 +12,22 @@ struct kernel_info;
>   *
>   * @d: pointer to the domain structure
>   */
> +#if defined(CONFIG_ARM64_AARCH32)
>  #define is_32bit_domain(d) ((d)->arch.type == DOMAIN_32BIT)
> +#else
> +#define is_32bit_domain(d) (false)
> +#endif /* CONFIG_ARM64_AARCH32 */

There's no need to make two separate definitions.  Use IS_ENABLED(). 
(This also fixes the evaluation of d problem you've introduced.)

IS_ENABLED(CONFIG_ARM64_AARCH32) && (d)->arch.type == DOMAIN_32BIT

>  
>  /*
>   * Returns true if guest execution state is AArch64
>   *
>   * @d: pointer to the domain structure
>   */
> +#if defined(CONFIG_ARM64_AARCH32)
>  #define is_64bit_domain(d) ((d)->arch.type == DOMAIN_64BIT)
> +#else
> +#define is_64bit_domain(d) (true)
> +#endif /* CONFIG_ARM64_AARCH32 */

!IS_ENABLED(CONFIG_ARM64_AARCH32) || (d)->arch.type == DOMAIN_64BIT

~Andrew

Reply via email to