From: Alejandro Vallejo <agarciav@amd.com>
To: Jan Beulich <jbeulich@suse.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 03/12] x86/hyperlaunch: initial support for hyperlaunch device tree
Date: Wed, 21 May 2025 19:24:36 +0200 [thread overview]
Message-ID: <DA20I56ZKPJ4.36GD5TP5BRZM6@amd.com> (raw)
In-Reply-To: <6f821e28-b182-4d27-b2db-e3be80910c12@suse.com>
On Wed May 21, 2025 at 5:00 PM CEST, Jan Beulich wrote:
> On 29.04.2025 14:36, Alejandro Vallejo wrote:
>> From: "Daniel P. Smith" <dpsmith@apertussolutions.com>
>>
>> Add the ability to detect both a formal hyperlaunch device tree or a dom0less
>> device tree. If the hyperlaunch device tree is found, then count the number of
>> domain entries, reporting an error if more than one is found.
>>
>> Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
>> Signed-off-by: Jason Andryuk <jason.andryuk@amd.com>
>> Signed-off-by: Alejandro Vallejo <agarciav@amd.com>
>> Reviewed-by: Denis Mukhin <dmukhin@ford.com>
>
> First: With your code re-use proposal sent earlier today I wonder how
> meaningful it is to further review this series. Much of it would change
> if that proposal was followed, I expect?
Should I follow through with that proposal, that would indeed have large
knock-on effects here. Sorry, I took longer than I thought I would
evaluating.
I'll go over your reviews and answer them in case they stay relevant
afterwards. Thanks for that.
>
> Then: When you say "hyperlaunch or dom0less" - is it entirely benign
> which of the two is found, as to further parsing? I ask because I can't
> spot anywhere that you would record which of the two (if any) was found.
Under dom0less everything is /chosen, mixed with other nodes.
Hyperlaunch mandates the initial system configuration to reside in
/chosen/hypervisor, which is meant to be "xen,hypervisor"-compatible.
The function is effectively finding a suitable root for the tree that
contains the initial system config.
>
>> --- a/xen/common/domain-builder/fdt.c
>> +++ b/xen/common/domain-builder/fdt.c
>> @@ -13,6 +13,36 @@
>>
>> #include "fdt.h"
>>
>> +static int __init find_hyperlaunch_node(const void *fdt)
>> +{
>> + int hv_node = fdt_path_offset(fdt, "/chosen/hypervisor");
>> +
>> + if ( hv_node >= 0 )
>> + {
>> + /* Anything other than zero indicates no match */
>> + if ( fdt_node_check_compatible(fdt, hv_node, "hypervisor,xen") )
>> + return -ENODATA;
>> +
>> + return hv_node;
>> + }
>> + else
>
> Please can such unnecessary (and potentially misleading) "else" be omitted?
Not sure how it could be misleading, but...
> As ...
>
>> + {
>> + /* Look for dom0less config */
>> + int node, chosen_node = fdt_path_offset(fdt, "/chosen");
>
> ... these will need to move to function scope then, one of the two may want
> folding with "hv_node" above.
... there is indeed a more compact form the function could take. Noted.
Cheers,
Alejandro
next prev parent reply other threads:[~2025-05-21 17:25 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
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 [this message]
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=DA20I56ZKPJ4.36GD5TP5BRZM6@amd.com \
--to=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=jbeulich@suse.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.