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 v5 08/10] xen: Split HAS_DEVICE_TREE in two
Date: Wed, 2 Jul 2025 17:28:25 +0200 [thread overview]
Message-ID: <DB1OC2FGH37J.3VDC4G4ABWFRI@amd.com> (raw)
In-Reply-To: <ffba326b-6fa4-449d-8db3-66fb145a61a4@suse.com>
On Wed Jul 2, 2025 at 3:30 PM CEST, Jan Beulich wrote:
> On 01.07.2025 12:57, Alejandro Vallejo wrote:
>> @@ -85,7 +86,11 @@ config HAS_ALTERNATIVE
>> config HAS_COMPAT
>> bool
>>
>> -config HAS_DEVICE_TREE
>> +config HAS_DEVICE_TREE_DISCOVERY
>> + bool
>> + select DEVICE_TREE_PARSE
>> +
>> +config DEVICE_TREE_PARSE
>> bool
>> select LIBFDT
>>
>
> We're in the middle of various ([almost] alphabetically sorted) HAS_* here.
> Thus DEVICE_TREE_PARSE wants to move elsewhere. Or we want to move back to
> naming it HAS_DEVICE_TREE_PARSE, but I think there was a reason why we didn't
> want it like that? Just that I don't recall what that reason was ...
AIUI, HAS_X are options selected by your architecture. Things that tell you
whether X is supported in your arch or not. In this case, HAS_DEVICE_TREE_PARSE
would be supported everywhere, while DEVICE_TREE_PARSE is not an arch property,
but an option selected by DOM0LESS_BOOT (which appears in menuconfig) and
HAS_DEVICE_TREE_DISCOVERY.
I can move it elsewhere, but it's unfortunate to separate two so closely
related options.
>
>> --- 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
>
> Is this correct? CPU pool creation isn't driven by DT discovery, I thought,
> but is a software-only thing much like dom0less?
In principle it would be possible. But I haven't tested the configuration, so
I'd rather err on the side of caution and not enable features prematurely.
In time, this should become DOM0LESS_BOOT || HAS_DEVICE_TREE_DISCOVERY.
>
>> --- a/xen/include/xsm/dummy.h
>> +++ b/xen/include/xsm/dummy.h
>> @@ -423,7 +423,7 @@ static XSM_INLINE int cf_check xsm_deassign_device(
>>
>> #endif /* HAS_PASSTHROUGH && HAS_PCI */
>>
>> -#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
>> +#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE_DISCOVERY)
>> static XSM_INLINE int cf_check xsm_assign_dtdevice(
>> XSM_DEFAULT_ARG struct domain *d, const char *dtpath)
>> {
>> @@ -438,7 +438,7 @@ static XSM_INLINE int cf_check xsm_deassign_dtdevice(
>> return xsm_default_action(action, current->domain, d);
>> }
>>
>> -#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */
>> +#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE_DISCOVERY */
>
> Here I'm similarly unsure: Pass-through again isn't a platform thing, is it?
This has to do strictly with passthrough of devices discovered via DT.
>
>> @@ -789,7 +789,7 @@ int xsm_multiboot_policy_init(
>> struct boot_info *bi, void **policy_buffer, size_t *policy_size);
>> #endif
>>
>> -#ifdef CONFIG_HAS_DEVICE_TREE
>> +#ifdef CONFIG_HAS_DEVICE_TREE_DISCOVERY
>> /*
>> * Initialize XSM
>> *
>> @@ -839,7 +839,7 @@ static inline int xsm_multiboot_init(struct boot_info *bi)
>> }
>> #endif
>>
>> -#ifdef CONFIG_HAS_DEVICE_TREE
>> +#ifdef CONFIG_HAS_DEVICE_TREE_DISCOVERY
>> static inline int xsm_dt_init(void)
>> {
>> return 0;
>> @@ -849,7 +849,7 @@ static inline bool has_xsm_magic(paddr_t start)
>> {
>> return false;
>> }
>> -#endif /* CONFIG_HAS_DEVICE_TREE */
>> +#endif /* CONFIG_HAS_DEVICE_TREE_DISCOVERY */
>
> The situation is yet less clear to me here
XSM segregates multibooting and DT-booting, this refers strictly to the latter.
By DT-booting I mean platforms where the DT is given by the platform rather
than the user as a module.
Cheers,
Alejandro
next prev parent reply other threads:[~2025-07-02 15:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 10:56 [PATCH v5 00/10] Allow x86 to unflatten DTs Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 01/10] x86: Replace arch-specific boot_module with common one Alejandro Vallejo
2025-07-02 12:43 ` Jan Beulich
2025-07-02 15:02 ` Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 02/10] xen: Refactor kernel_info to have a header like boot_domain Alejandro Vallejo
2025-07-02 12:56 ` Jan Beulich
2025-07-02 16:04 ` Alejandro Vallejo
2025-07-03 6:01 ` Jan Beulich
2025-07-03 9:57 ` Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 03/10] x86: Replace arch-specific boot_domain with the common one Alejandro Vallejo
2025-07-02 13:15 ` Jan Beulich
2025-07-02 15:04 ` Alejandro Vallejo
2025-07-02 15:09 ` Alejandro Vallejo
2025-07-02 15:15 ` Jan Beulich
2025-07-02 15:34 ` Alejandro Vallejo
2025-07-03 6:04 ` Jan Beulich
2025-07-07 14:49 ` Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 04/10] xen/dt: Move bootfdt functions to xen/bootfdt.h Alejandro Vallejo
2025-07-01 10:56 ` [PATCH v5 05/10] xen/dt: Move bootinfo functions to a new bootinfo.h Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 06/10] xen/dt: Rename bootfdt.c -> bootinfo-fdt.c Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 07/10] xen/dt: Extract helper to map nodes to module kinds Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 08/10] xen: Split HAS_DEVICE_TREE in two Alejandro Vallejo
2025-07-02 13:30 ` Jan Beulich
2025-07-02 15:28 ` Alejandro Vallejo [this message]
2025-07-03 5:55 ` Jan Beulich
2025-07-03 10:04 ` Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 09/10] xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h} Alejandro Vallejo
2025-07-01 10:57 ` [PATCH v5 10/10] xen/dt: Allow CONFIG_DEVICE_TREE_PARSE to include device-tree/ 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=DB1OC2FGH37J.3VDC4G4ABWFRI@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.