]> xenbits.xensource.com Git - xen.git/commit
xen/common: dom0less: make some parts of Arm's CONFIG_DOM0LESS common
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Mon, 5 May 2025 18:10:32 +0000 (20:10 +0200)
committerStefano Stabellini <stefano.stabellini@amd.com>
Mon, 5 May 2025 21:38:17 +0000 (14:38 -0700)
commitad03faa942b953752a1e2083430be23033a3a5c3
treed945b22d42d822535f5974e7ebe8230657da575f
parent07107633b3455ed9dc22498708e01e4aea1d6527
xen/common: dom0less: make some parts of Arm's CONFIG_DOM0LESS common

Move some parts of Arm's Dom0Less code to be reused by other architectures.
At the moment, RISC-V is going to reuse these parts.

Move dom0less-build.h from the Arm-specific directory to asm-generic
as these header is expected to be the same across acrhictectures with
some updates: add the following declaration of construct_domU(),
and arch_create_domUs() as there are some parts which are still
architecture-specific.

Introduce HAS_DOM0LESS to provide ability to enable generic Dom0less
code for an architecture.

Relocate the CONFIG_DOM0LESS configuration to the common with adding
"depends on HAS_DOM0LESS" to not break builds for architectures which
don't support CONFIG_DOM0LESS config, especically it would be useful
to not provide stubs for  construct_domU(), arch_create_domUs()
in case of *-randconfig which may set CONFIG_DOM0LESS=y.

Move is_dom0less_mode() function to the common code, as it depends on
boot modules that are already part of the common code.

Move create_domUs() function to the common code with some updates:
- Add arch_create_domUs() to cover parsing of arch-specific features,
  for example, SVE (Scalar Vector Extension ) exists only in Arm.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
[stefano: fix arch_create_domUs to only modify flags]
Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/Kconfig
xen/arch/arm/dom0less-build.c
xen/arch/arm/include/asm/Makefile
xen/arch/arm/include/asm/dom0less-build.h [deleted file]
xen/common/Kconfig
xen/common/device-tree/Makefile
xen/common/device-tree/dom0less-build.c [new file with mode: 0644]
xen/include/asm-generic/dom0less-build.h [new file with mode: 0644]