On 26.12.2024 17:57, Daniel P. Smith wrote:
> Add a domid field to struct boot_domain to hold the assigned domain id for the
> domain. During initialization, ensure all instances of struct boot_domain have
> the invalid domid to ensure that the domid must be set either by convention or
> configuration.

I'm still missing justification for the duplication between the struct domain *
that's already in struct boot_domain and this new member. Iirc you responded to
this earlier question of mine, but nothing was put here.

> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -292,6 +292,7 @@ static const char *cmdline_cook(const char *p, const char 
> *loader_name);
>  struct boot_info __initdata xen_boot_info = {
>      .loader = "unknown",
>      .cmdline = "",
> +    .domains = { {.domid = DOMID_INVALID} },

Please can you fully use designated initializers here, thus also protecting
against MAX_NR_BOOTDOMS increasing without and update being done here (and
the compiler still being happy)?

    .domains = { [0 ... MAX_NR_BOOTDOMS - 1] = { .domid = DOMID_INVALID } },

Nit: Note also the blanks I added.

Jan

Reply via email to