[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v5 00/10] Allow x86 to unflatten DTs


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <agarciav@xxxxxxx>
  • Date: Tue, 1 Jul 2025 12:56:54 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NKIUkjTbMLCT3kXY31pNRIAUTLtFhGAiy/wjs5ccrhI=; b=yo5I8y4ZW5HkBa2CJDpzxk4DDnoXwBxr+VdZeV9pQuFsuVoCCcv2+VdoZstI1d+C4I4lTXcdmc18HkiULktfaTDlQSFV1qtPIFuVfjff+kghPS8Qf0XA5EaEeACfU3qo/UvofmRd+YtiQIFnda6XdIrjgDDt7AXtP2ovCjWACoeqFt/XxpN3fxEQXru5ClxFhJTZJwZZVzyHh3WBBjAdnb8KuXtFkuj/bPaPk1UmuJMm7xe8TnFVpWh4rxFZcINFoed5ri1eYXvN5+gCjHMQcUzuywO3rezOaMef/X34KE3WZWD3t8iqVYdaQj1j4EArExGi1oreV12WH329fLekZA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dUkdD8XvYenpiv7T5hwBW9TX6wzhYTg0wmX4rqmJHOwRglaYRgszKRkLcANWWx3732DZk/JDGLADL6/AC+jWFDTnkFm7anI/0ohlS0evxE2Nv6Oinmov8E0NhZmkgptSDxiZhqXYRn8bXE00TRT589CKDtzR6ds2CR6ktRNHvhK1ZbK3dYJ+JdXd/j8HaWlnWjYwQCVnZm1iH5QxvNpOrdnsmhyzDKyih0ANMb9moWpwkGA67oBVLNvenYcvyGOAhM7JpTSxVD3kDRgYPGSVXD7A7IR+sMaMNuOiwN8HR49MUAxSMCTLyaxbJEGUoln8A7hQU6tf9xj/Nz3Fdd0ohQ==
  • Cc: Alejandro Vallejo <agarciav@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, "Oleksii Kurochko" <oleksii.kurochko@xxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, George Dunlap <gwd@xxxxxxxxxxxxxx>, "Shawn Anastasio" <sanastasio@xxxxxxxxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 01 Jul 2025 10:57:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

pipeline: https://gitlab.com/xen-project/people/agvallejo/xen/-/pipelines

Hi,

New revision. It reconfigures Kconfig as discussed in v4. Otherwise it's same
old-same old.

Contrary to the series name, x86 never really gains such an ability, but it's
a trivial patch away.

Previous versions
=================

v4: https://lore.kernel.org/xen-devel/20250620182859.23378-1-agarciav@xxxxxxx/
v3: https://lore.kernel.org/xen-devel/20250613151612.754222-1-agarciav@xxxxxxx/
v3: https://lore.kernel.org/xen-devel/20250613151612.754222-1-agarciav@xxxxxxx/
v2: https://lore.kernel.org/xen-devel/20250605194810.2782031-1-agarciav@xxxxxxx/
v1: https://lore.kernel.org/xen-devel/20250530120242.39398-1-agarciav@xxxxxxx/

Original cover letter
=====================

This is the aftermath of this discussion:

  
https://lore.kernel.org/xen-devel/DA1WWRUQLCAG.ZTVR1HXJ85V0@xxxxxxx/https://lore.kernel.org/xen-devel/DA1WWRUQLCAG.ZTVR1HXJ85V0@xxxxxxx/

It's a first round of cleanup and preparation to have a much easier time
later when integrating dom0less boot into hyperlaunch.

The refactor on device-tree/ is _fine_ by I'm open to other suggestions
to achieve the same thing. In particular, after this series x86 can
unflatten the DT host device tree when it has CONFIG_DOM0LESS_BOOT set,
which enables the builder to use factored-out functions from
dom0less-build.c (not done here).

The diffstat is deceptive because I renamed a large file and then
created a new file with the same name. There aren't that many LoC
changes.

Alejandro Vallejo (10):
  x86: Replace arch-specific boot_module with common one
  xen: Refactor kernel_info to have a header like boot_domain
  x86: Replace arch-specific boot_domain with the common one
  xen/dt: Move bootfdt functions to xen/bootfdt.h
  xen/dt: Move bootinfo functions to a new bootinfo.h
  xen/dt: Rename bootfdt.c -> bootinfo-fdt.c
  xen/dt: Extract helper to map nodes to module kinds
  xen: Split HAS_DEVICE_TREE in two
  xen/dt: ifdef out DEV_DT-related bits from device_tree.{c,h}
  xen/dt: Allow CONFIG_DEVICE_TREE_PARSE to include device-tree/

 xen/Kconfig.debug                       |   2 +-
 xen/arch/arm/Kconfig                    |   2 +-
 xen/arch/arm/dom0less-build.c           |   8 +-
 xen/arch/arm/domain_build.c             |  21 +-
 xen/arch/arm/include/asm/setup.h        |   2 +-
 xen/arch/arm/kernel.c                   |   8 +-
 xen/arch/arm/setup.c                    |   1 +
 xen/arch/ppc/Kconfig                    |   2 +-
 xen/arch/riscv/Kconfig                  |   2 +-
 xen/arch/riscv/cpufeature.c             |   1 +
 xen/arch/riscv/mm.c                     |   2 +-
 xen/arch/riscv/setup.c                  |   2 +-
 xen/arch/riscv/smpboot.c                |   1 +
 xen/arch/x86/cpu/microcode/core.c       |   7 +-
 xen/arch/x86/hvm/dom0_build.c           |   8 +-
 xen/arch/x86/include/asm/boot-domain.h  |  33 --
 xen/arch/x86/include/asm/bootfdt.h      |  56 ++
 xen/arch/x86/include/asm/bootinfo.h     |  57 +--
 xen/arch/x86/pv/dom0_build.c            |   6 +-
 xen/arch/x86/setup.c                    |  55 +-
 xen/common/Kconfig                      |  13 +-
 xen/common/Makefile                     |   4 +-
 xen/common/device-tree/Makefile         |   5 +-
 xen/common/device-tree/bootfdt.c        | 654 ++----------------------
 xen/common/device-tree/bootinfo-fdt.c   | 583 +++++++++++++++++++++
 xen/common/device-tree/bootinfo.c       |   2 +-
 xen/common/device-tree/device-tree.c    |   3 +
 xen/common/device-tree/dom0less-build.c |  20 +-
 xen/common/device-tree/domain-build.c   |  22 +-
 xen/common/device-tree/kernel.c         |  22 +-
 xen/common/device-tree/static-evtchn.c  |   1 +
 xen/common/device.c                     |   4 +-
 xen/common/efi/boot.c                   |   2 +-
 xen/common/sched/Kconfig                |   2 +-
 xen/common/sched/boot-cpupool.c         |   1 +
 xen/drivers/char/ns16550.c              |   6 +-
 xen/drivers/passthrough/Makefile        |   2 +-
 xen/drivers/passthrough/iommu.c         |   2 +-
 xen/include/asm-generic/device.h        |  10 +-
 xen/include/xen/bootfdt.h               | 300 ++++-------
 xen/include/xen/bootinfo.h              | 213 ++++++++
 xen/include/xen/device_tree.h           |  82 +--
 xen/include/xen/fdt-domain-build.h      |   2 +-
 xen/include/xen/fdt-kernel.h            |   7 +-
 xen/include/xen/iommu.h                 |   8 +-
 xen/include/xsm/dummy.h                 |   4 +-
 xen/include/xsm/xsm.h                   |  12 +-
 xen/xsm/dummy.c                         |   2 +-
 xen/xsm/flask/hooks.c                   |   6 +-
 xen/xsm/xsm_core.c                      |   4 +-
 xen/xsm/xsm_policy.c                    |   6 +-
 51 files changed, 1159 insertions(+), 1121 deletions(-)
 delete mode 100644 xen/arch/x86/include/asm/boot-domain.h
 create mode 100644 xen/arch/x86/include/asm/bootfdt.h
 create mode 100644 xen/common/device-tree/bootinfo-fdt.c
 create mode 100644 xen/include/xen/bootinfo.h


base-commit: 64be4fecd7d95058fbbb9057a6170fb4e0e9ad06
-- 
2.43.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.