On 08/04/2026 1:55 pm, Frediano Ziglio wrote:
> diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
> index 864dd9e53e..56eba8f59a 100644
> --- a/xen/arch/x86/dom0_build.c
> +++ b/xen/arch/x86/dom0_build.c
> @@ -320,6 +320,20 @@ unsigned long __init dom0_paging_pages(const struct 
> domain *d,
>      return DIV_ROUND_UP(memkb, 1024) << (20 - PAGE_SHIFT);
>  }
>  
> +int __init initdom_check_parms(
> +    const struct domain *d, const struct elf_dom_parms *parms)
> +{
> +    if ( parms->elf_notes[XEN_ELFNOTE_SUPPORTED_FEATURES].type == 
> XEN_ENT_NONE )
> +        return 0;
> +
> +    if ( is_hardware_domain(d) && !test_bit(XENFEAT_dom0, 
> parms->f_supported) )
> +    {
> +        printk("Kernel does not support Dom0 operation\n");
> +        return -EINVAL;
> +    }
> +
> +    return 0;
> +}

Your v1 structure was better (give or take whitespace mangling).

This needs to be a nested pair of if() conditions to not need rewriting
when SecureBoot check is added.

I'm going to fold this adjustment and commit it, because I need this
patch to fix a separate bug in the patchqueue.

~Andrew

Reply via email to