From: Oleksii Moisieiev <Oleksii_Moisieiev@epam.com>
To: "dmkhn@proton.me" <dmkhn@proton.me>, Jan Beulich <jbeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Julien Grall" <julien@xen.org>,
"Michal Orzel" <michal.orzel@amd.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Oleksandr Tyshchenko" <Oleksandr_Tyshchenko@epam.com>
Subject: Re: [PATCH v2] xen/arm, xen/common: Add Kconfig option to control Dom0 boot
Date: Mon, 4 Aug 2025 14:04:20 +0000 [thread overview]
Message-ID: <63781514-eef6-46c8-992f-56bde2f07e82@epam.com> (raw)
In-Reply-To: <aIlGtLz4ZxNwE/gO@kraken>
On 30/07/2025 01:10, dmkhn@proton.me wrote:
> On Tue, Jul 29, 2025 at 10:20:54AM +0200, Jan Beulich wrote:
>> On 28.07.2025 23:28, dmkhn@proton.me wrote:
>>> On Mon, Jul 28, 2025 at 05:07:30PM +0000, Oleksii Moisieiev wrote:
>>>> This commit introduces a new Kconfig option, `CONFIG_DOM0_BOOT`, to
>>>> allow for building Xen without support for booting a regular domain (Dom0).
>>>> This functionality is primarily intended for the ARM architecture.
>>>>
>>>> A new Kconfig symbol, `HAS_DOM0`, has been added and is selected by
>>>> default for ARM and X86 architecture. This symbol signifies that an
>>>> architecture has the capability to support a Dom0.
>>>>
>>>> The `DOM0_BOOT` option depends on `HAS_DOM0` and defaults to 'y'. For
>>>> expert users, this option can be disabled (`CONFIG_EXPERT=y` and no
>>>> `CONFIG_DOM0_BOOT` in the config), which will compile out the Dom0
>>>> creation code on ARM. This is useful for embedded or dom0less-only
>>>> scenarios to reduce binary size and complexity.
>>>>
>>>> The ARM boot path has been updated to panic if it detects a non-dom0less
>>>> configuration while `CONFIG_DOM0_BOOT` is disabled, preventing an invalid
>>>> boot.
>>>>
>>>> Signed-off-by: Oleksii Moisieiev <oleksii_moisieiev@epam.com>
>>>>
>>>> ---
>>>>
>>>> ---
>>>> xen/arch/arm/Kconfig | 1 +
>>>> xen/arch/arm/domain_build.c | 8 ++++++++
>>>> xen/arch/arm/setup.c | 14 ++++++++++----
>>>> xen/arch/x86/Kconfig | 1 +
>>>> xen/common/Kconfig | 11 +++++++++++
>>>> 5 files changed, 31 insertions(+), 4 deletions(-)
>>> I think there should be changes in
>>> include/xen/domain.h
>>> and
>>> arch/arm/include/asm/setup.h
>>> to compile out declarations of dom0_max_vcpus() and create_dom0() under new
>>> CONFIG_DOM0_BOOT.
>> Adding #ifdef-ary just to hide declarations is often merely adding clutter,
>> without providing a clear benefit. I didn't check in this case, but I think
>> when making such a request you want to clarify what the gains would be of
>> adding more #ifdef.
> re: clutter: fully agree.
>
> I was thinking about this following code where ifdef-ery may be needed:
>
> + if ( IS_ENABLED(CONFIG_DOM0_BOOT) && !is_dom0less_mode() )
> + {
> + /* Create initial domain 0. */
> create_dom0();
> + }
>
> But looks like compiler is correctly throwing away create_dom0() call.
Yes, it is. It is preferable to use IS_ENABLED in if statements whenever
possible.
>> Jan
next prev parent reply other threads:[~2025-08-04 14:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 17:07 [PATCH v2] xen/arm, xen/common: Add Kconfig option to control Dom0 boot Oleksii Moisieiev
2025-07-28 21:28 ` dmkhn
2025-07-29 8:20 ` Jan Beulich
2025-07-29 22:10 ` dmkhn
2025-08-04 14:04 ` Oleksii Moisieiev [this message]
2025-07-29 7:22 ` Orzel, Michal
2025-08-04 14:05 ` Oleksii Moisieiev
2025-08-06 9:45 ` Oleksii Moisieiev
2025-07-29 8:18 ` Jan Beulich
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=63781514-eef6-46c8-992f-56bde2f07e82@epam.com \
--to=oleksii_moisieiev@epam.com \
--cc=Oleksandr_Tyshchenko@epam.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=dmkhn@proton.me \
--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.