All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Vallejo <agarciav@amd.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Shawn Anastasio" <sanastasio@raptorengineering.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Bob Eshleman" <bobbyeshleman@gmail.com>,
	"Connor Davis" <connojdavis@gmail.com>,
	"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	"Dario Faggioli" <dfaggioli@suse.com>,
	"Juergen Gross" <jgross@suse.com>,
	"George Dunlap" <gwd@xenproject.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v4 10/12] xen: Rename CONFIG_HAS_DEVICE_TREE to CONFIG_HAS_DEVICE_TREE_DISCOVERY
Date: Mon, 23 Jun 2025 15:11:50 +0200	[thread overview]
Message-ID: <DATXSLGR4W0C.I4IQ77V0K6FH@amd.com> (raw)
In-Reply-To: <490ee7bf-cb10-43e3-9416-9a68e7529b96@suse.com>

On Mon Jun 23, 2025 at 9:39 AM CEST, Jan Beulich wrote:
> On 20.06.2025 20:28, Alejandro Vallejo wrote:
>> Moving forward the idea is for there to be:
>>   1. Basic DT support: used by dom0less/hyperlaunch.
>>   2. Full DT support: used for device discovery and HW setup.
>> 
>> Rename HAS_DEVICE_TREE to HAS_DEVICE_TREE_DISCOVERY to describe (2), while
>> DOM0LESS_BOOT is left to describe (1).
>
> Considering hyperlaunch this feels wrong to me. Did you consider splitting
> HAS_DEVICE_TREE into HAS_DEVICE_TREE_PARSE and HAS_DEVICE_TREE_DISCOVERY,
> as I suggested on the committers call? You weren't there, but Stefano said
> he was taking notes.

Some might've been lost is transit, I admit. I don't remember hearing about
a HAS_DEVICE_TREE_PARSE, but it might've very well been me being spotty when
syncing with Stefano.

Having a special HAS_DEVICE_TREE_PARSE doesn't seem very helpful, as every
arch would have it set. I'd definitely like for the "enable support to boot
several predefined domains from DTB descriptions" to be a single option for both
dom0less and hyperlaunch. And be selectable rather than unconditionally selected
And ideally move towards a future in which both dom0less and hyperlaunch are one
and the same.

I can do an early rename s/HAS_DOM0LESS/HAS_PREDEFINED_DOMAINS and s/
DOM0LESS_BOOT/BOOT_PREDEFINED_DOMAINS/ if that helps. I was waiting to do so
until x86 gains the ability to boot off a DTB to avoid having help messages
describing things not yet on the tree.

>
>> --- a/xen/common/Kconfig
>> +++ b/xen/common/Kconfig
>> @@ -14,7 +14,7 @@ config CORE_PARKING
>>  
>>  config DOM0LESS_BOOT
>>  	bool "Dom0less boot support" if EXPERT
>> -	depends on HAS_DOM0LESS && HAS_DEVICE_TREE && DOMAIN_BUILD_HELPERS
>> +	depends on HAS_DOM0LESS && HAS_DEVICE_TREE_DISCOVERY && DOMAIN_BUILD_HELPERS
>>  	default y
>>  	help
>>  	  Dom0less boot support enables Xen to create and start domU guests during
>> @@ -85,7 +85,7 @@ config HAS_ALTERNATIVE
>>  config HAS_COMPAT
>>  	bool
>>  
>> -config HAS_DEVICE_TREE
>> +config HAS_DEVICE_TREE_DISCOVERY
>>  	bool
>>  	select LIBFDT
>
> This select imo ought to move to HAS_DEVICE_TREE_PARSE, unless I misunderstand
> what LIBFDT covers.

Doing so would preclude compiling it out on x86 when hyperlaunch is not there.
LIBFDT is very much essential on arm/riscv/ppc, but not so on x86.

>
>> --- a/xen/common/Makefile
>> +++ b/xen/common/Makefile
>> @@ -6,9 +6,9 @@ obj-$(CONFIG_HYPFS_CONFIG) += config_data.o
>>  obj-$(CONFIG_CORE_PARKING) += core_parking.o
>>  obj-y += cpu.o
>>  obj-$(CONFIG_DEBUG_TRACE) += debugtrace.o
>> -obj-$(CONFIG_HAS_DEVICE_TREE) += device.o
>> +obj-$(CONFIG_HAS_DEVICE_TREE_DISCOVERY) += device.o
>>  obj-$(filter-out $(CONFIG_X86),$(CONFIG_ACPI)) += device.o
>> -obj-$(CONFIG_HAS_DEVICE_TREE) += device-tree/
>> +obj-$(CONFIG_HAS_DEVICE_TREE_DISCOVERY) += device-tree/
>
> Here I'm less certain - is everything in that subdir truly "discovery" related?

The non-discovery related parts are quite entangled with the discovery ones. In
time, I'll want to move an untangled dom0less/hyperlaunch subset onto a separate
predef-doms/ folder iff all of it starts using LIBFDT rather than unflattened
DTs, but that's a future endavour.

There's also all of bootinfo, which is not discovery related, but is used ATM
exclusively by arches doing discovery.

>
>> --- a/xen/common/sched/Kconfig
>> +++ b/xen/common/sched/Kconfig
>> @@ -67,7 +67,7 @@ endmenu
>>  
>>  config BOOT_TIME_CPUPOOLS
>>  	bool "Create cpupools at boot time"
>> -	depends on HAS_DEVICE_TREE
>> +	depends on HAS_DEVICE_TREE_DISCOVERY
>>  	help
>>  	  Creates cpupools during boot time and assigns cpus to them. Cpupools
>>  	  options can be specified in the device tree.
>
> This similarly looks wrong to me. Whether to create CPU pools is purely a
> Xen-internal software thing, isn't it?
>
> Jan

In principle, it should be HAS_DOM0LESS and likely will be later when I hook it
for x86. I was waiting for x86 needing such a change to use the binding. Would
you rather have the change done now?

Cheers,
Alejandro


  parent reply	other threads:[~2025-06-23 13:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-20 18:28 [PATCH v4 00/12] Allow x86 to unflatten DTs Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 01/12] CODING_STYLE: Custom type names must be snake-cased by word Alejandro Vallejo
2025-06-21  1:06   ` Stefano Stabellini
2025-06-23  7:31   ` Jan Beulich
2025-06-23 11:22     ` Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 02/12] xen: Rename bootmodule{,s} to boot_module{,s} Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 03/12] x86: Replace arch-specific boot_module with common one Alejandro Vallejo
2025-06-21  1:12   ` Stefano Stabellini
2025-06-20 18:28 ` [PATCH v4 04/12] xen: Refactor kernel_info to have a header like boot_domain Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 05/12] x86: Replace arch-specific boot_domain with the common one Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 06/12] xen/dt: Move bootfdt functions to xen/bootfdt.h Alejandro Vallejo
2025-06-21  1:20   ` Stefano Stabellini
2025-06-20 18:28 ` [PATCH v4 07/12] xen/dt: Move bootinfo functions to a new bootinfo.h Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 08/12] xen/dt: Rename bootfdt.c -> bootinfo-fdt.c Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 09/12] xen/dt: Extract helper to map nodes to module kinds Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 10/12] xen: Rename CONFIG_HAS_DEVICE_TREE to CONFIG_HAS_DEVICE_TREE_DISCOVERY Alejandro Vallejo
2025-06-21  1:25   ` Stefano Stabellini
2025-06-23  7:39   ` Jan Beulich
2025-06-23  7:41     ` Jan Beulich
2025-06-23 13:11     ` Alejandro Vallejo [this message]
2025-06-23 13:44       ` Jan Beulich
2025-06-23 14:19         ` Alejandro Vallejo
2025-06-23 14:26           ` Jan Beulich
2025-06-23 15:10             ` Alejandro Vallejo
2025-06-20 18:28 ` [PATCH v4 11/12] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h} Alejandro Vallejo
2025-06-21  1:27   ` Stefano Stabellini
2025-06-23  7:44   ` Jan Beulich
2025-06-23 13:18     ` Alejandro Vallejo
2025-06-23 13:45       ` Jan Beulich
2025-06-20 18:28 ` [PATCH v4 12/12] xen/dt: Remove DOM0LESS_BOOT's requirement on HAS_DEVICE_TREE_DISCOVERY Alejandro Vallejo
2025-06-21  1:45   ` Stefano Stabellini

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=DATXSLGR4W0C.I4IQ77V0K6FH@amd.com \
    --to=agarciav@amd.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=connojdavis@gmail.com \
    --cc=dfaggioli@suse.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=gwd@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=marmarek@invisiblethingslab.com \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=sanastasio@raptorengineering.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.