All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Alejandro Vallejo <agarciav@amd.com>
Cc: "Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Jason Andryuk" <jason.andryuk@amd.com>,
	"Denis Mukhin" <dmukhin@ford.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v6 02/12] common/hyperlaunch: introduce the domain builder
Date: Wed, 21 May 2025 10:54:42 +0200	[thread overview]
Message-ID: <b57229cf-cdf9-46ea-89d4-4cce4b1bf0df@suse.com> (raw)
In-Reply-To: <20250429123629.20839-3-agarciav@amd.com>

On 29.04.2025 14:36, Alejandro Vallejo wrote:
> @@ -1284,9 +1285,14 @@ void asmlinkage __init noreturn __start_xen(void)
>                 bi->nr_modules);
>      }
>  
> -    /* Dom0 kernel is always first */
> -    bi->mods[0].type = BOOTMOD_KERNEL;
> -    bi->domains[0].kernel = &bi->mods[0];
> +    if ( builder_init(bi) == FDT_KIND_NONE )

With this, can ...

> +    {
> +        /* Find first unknown boot module to use as dom0 kernel */
> +        i = first_boot_module_index(bi, BOOTMOD_UNKNOWN);

... i ever be anything else than 0? If not, perhaps keeping the call here is
still fine (kind of for doc purposes), but an assertion may then want adding.

> +        bi->mods[i].type = BOOTMOD_KERNEL;
> +        bi->domains[0].kernel = &bi->mods[i];
> +        bi->hyperlaunch_enabled = false;

Is this necessary, when the field is supposed to be starting out clear?

> --- /dev/null
> +++ b/xen/common/domain-builder/Makefile
> @@ -0,0 +1,2 @@
> +obj-y += fdt.init.o
> +obj-y += core.init.o

Any reason for these not both adding to obj-bin-y, like we do elsewhere for
*.init.o?

Also please sort object lists alphabetically.

> --- /dev/null
> +++ b/xen/include/xen/domain-builder.h
> @@ -0,0 +1,29 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +#ifndef __XEN_DOMAIN_BUILDER_H__
> +#define __XEN_DOMAIN_BUILDER_H__
> +
> +struct boot_info;
> +
> +/* Return status of builder_init(). Shows which boot mechanism was detected */
> +enum fdt_kind
> +{
> +    /* FDT not found. Skipped builder. */
> +    FDT_KIND_NONE,
> +    /* Found an FDT that wasn't hyperlaunch. */
> +    FDT_KIND_UNKNOWN,
> +};
> +
> +/*
> + * Initialises `bi` if it detects a compatible FDT. Otherwise returns
> + * FDT_KIND_NONE and leaves initialisation up to the caller.
> + */
> +#if IS_ENABLED(CONFIG_DOMAIN_BUILDER)

For the pre-processor it wants to be the simpler #ifdef.

Jan


  parent reply	other threads:[~2025-05-21  8:54 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 12:36 [PATCH v6 00/12] Hyperlaunch device tree for dom0 Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 01/12] kconfig: introduce CONFIG_DOMAIN_BUILDER Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 02/12] common/hyperlaunch: introduce the domain builder Alejandro Vallejo
2025-04-30 18:56   ` Daniel P. Smith
2025-05-02  7:21     ` Jan Beulich
2025-05-06 19:29       ` Daniel P. Smith
2025-05-13  8:05         ` Jan Beulich
2025-05-13 22:23           ` Daniel P. Smith
2025-05-22 14:07             ` Alejandro Vallejo
2025-05-15 13:17       ` Daniel P. Smith
2025-05-21  8:54   ` Jan Beulich [this message]
2025-05-22 12:09     ` Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 03/12] x86/hyperlaunch: initial support for hyperlaunch device tree Alejandro Vallejo
2025-05-21 15:00   ` Jan Beulich
2025-05-21 17:24     ` Alejandro Vallejo
2025-05-22  6:55       ` Jan Beulich
2025-04-29 12:36 ` [PATCH v6 04/12] x86/hyperlaunch: Add helpers to locate multiboot modules Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 05/12] x86/hyperlaunch: locate dom0 kernel with hyperlaunch Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 06/12] x86/hyperlaunch: obtain cmdline from device tree Alejandro Vallejo
2025-06-09 17:07   ` Jason Andryuk
2025-06-10  6:56     ` Jan Beulich
2025-06-10 17:39       ` Jason Andryuk
2025-06-11  5:35         ` Jan Beulich
2025-06-12  8:20           ` Alejandro Vallejo
2025-06-12  8:44             ` Jan Beulich
2025-04-29 12:36 ` [PATCH v6 07/12] x86/hyperlaunch: locate dom0 initrd with hyperlaunch Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 08/12] x86/hyperlaunch: add domain id parsing to domain config Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 09/12] x86/hyperlaunch: specify dom0 mode with device tree Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 10/12] x86/hyperlaunch: add memory parsing to domain config Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 11/12] x86/hyperlaunch: add max vcpu parsing of hyperlaunch device tree Alejandro Vallejo
2025-04-29 12:36 ` [PATCH v6 12/12] x86/hyperlaunch: add capabilities to boot domain Alejandro Vallejo
2025-04-29 13:00 ` [PATCH v6 00/12] Hyperlaunch device tree for dom0 Jan Beulich
2025-04-29 13:22   ` Alejandro Vallejo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b57229cf-cdf9-46ea-89d4-4cce4b1bf0df@suse.com \
    --to=jbeulich@suse.com \
    --cc=agarciav@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dmukhin@ford.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=jason.andryuk@amd.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.