Skip to content

Boot modules for Hyperlaunch

Daniel P. Smith xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 41 repliesIn review

Changes since v7 from the cover letter

- patches re-organized with some collapsing into others

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12x86/boot: introduce boot module typesxen/arch/x86/cpu/microcode/core.c xen/arch/x86/include/asm/bootinfo.h xen/arch/x86/setup.c +1 more+18 -02 replies
2/12x86/boot: eliminate module_mapxen/arch/x86/cpu/microcode/core.c xen/arch/x86/include/asm/bootinfo.h xen/arch/x86/setup.c +1 more+70 -319 replies
3/12x86/boot: introduce boot module flagsxen/arch/x86/include/asm/bootinfo.h xen/arch/x86/setup.c+9 -42 replies
4/12x86/boot: introduce module releasexen/arch/x86/cpu/microcode/core.c xen/arch/x86/hvm/dom0_build.c xen/arch/x86/include/asm/bootinfo.h +4 more+67 -315 replies
5/12x86/boot: move headroom to boot modulesxen/arch/x86/include/asm/bootinfo.h xen/arch/x86/setup.c+30 -152 replies
6/12x86/boot: relocate kextra into boot infoxen/arch/x86/include/asm/bootinfo.h xen/arch/x86/setup.c+3 -12 replies
7/12x86/boot: add cmdline_pa to struct boot_modulexen/arch/x86/include/asm/bootinfo.h xen/arch/x86/setup.c+6 -02 replies
8/12x86/boot: convert domain construction to use boot infoxen/arch/x86/dom0_build.c xen/arch/x86/hvm/dom0_build.c xen/arch/x86/include/asm/dom0_build.h +3 more+95 -756 replies
9/12x86/boot: add start and size fields to struct boot_modulexen/arch/x86/cpu/microcode/core.c xen/arch/x86/hvm/dom0_build.c xen/arch/x86/include/asm/bootinfo.h +4 more+64 -795 replies
10/12x86/boot: introduce boot domainxen/arch/x86/dom0_build.c xen/arch/x86/hvm/dom0_build.c xen/arch/x86/include/asm/bootdomain.h +5 more+68 -512 replies
11/12x86/boot: introduce domid field to struct boot_domainxen/arch/x86/include/asm/bootdomain.h xen/arch/x86/setup.c+9 -50 replies
12/12x86/boot: add cmdline to struct boot_domainxen/arch/x86/include/asm/bootdomain.h xen/arch/x86/include/asm/dom0_build.h xen/arch/x86/pv/dom0_build.c +1 more+15 -122 replies

Reviews trailers per patch

7 of 12 patches have a Reviewed-by or Acked-by.

PatchJason AndryukAndrew Cooper
1/12R-b
2/12
3/12R-b
4/12
5/12R-b
6/12R-b
7/12R-b
8/12
9/12
10/12R-b
11/12R-b
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] Boot modules for Hyperlaunch

The Boot Modules for Hyperlaunch series is an effort to split out preliminary changes necessary for the introduction of the Hyperlaunch domain builder logic. These preliminary changes revolve around introducing the struct boot_module and struct boot_domain structures. This includes converting the dom0 construction path to use these structures. These abstractions lay the groundwork to transform and extend the dom0 construction logic into a limited, but general domain builder.

The splitting of Hyperlaunch into a set of series are twofold, to reduce the effort in reviewing a much larger series, and to reduce the effort in handling the knock-on effects to the construction logic from requested review changes.

Much thanks to AMD for supporting this work.

!!NOTE on v8!!
For this version a complete re-organization of the changes were made with the concept that three tasks were being carried out that were intertwined in the past versions. These three tasks were 1. capturing the state tracking and enrichment, 2. removing the use of module_t to track where a boot module is located in memory, and 3. abstract the domain construction state. The first eight patches address task 1, task 2 is address with patch nine, and the remaining addresses task 3.

Lastly it should be noted that this series builds/relies upon Andy Cooper's "x86/ucode: Fix module-handling use-after-free's" series.

Documentation on Hyperlaunch:
https://wiki.xenproject.org/wiki/Hyperlaunch

Original Hyperlaunch v1 patch series:
https://lists.xenproject.org/archives/html/xen-devel/2022-07/msg00345.html

V/r,
Daniel P. Smith

Changes since v7:
- patches re-organized with some collapsing into others

Changes since v6:
- Dropped patches that were merged from v5
- patch 8 title and commit message rewritten
- boot module interator patch merged with xsm patch, its first use
- incorporated review requests
- made additional style optimizations as a result of review requests

Changes since v5:
- switched to per patch change logs
- incorporated review requests

Changes since v4:
- added requested inline code comments
- moved instance of struct boot_info to unit level and extern'ed
- array of struct boot_module moved into struct boot_info
- renamed function to multiboot_fill_bootinfo, now returns *struct boot_info
- multiboot_fill_bootinfo changed to take multiboot_info_t addr as param
- added missing guard that checked there were multiboot1/2 modules passed
- renmaed struct elements per the review
- fixed errant commit messages per the review
- corrected coding style per review
- attempted to repalce all open codings of page/addr translations touched
- unified use of bi as var name for pointer ref to struct boot_info
- when appropriate, ensure variables where typed, eg size_t, paddr_t, etc.
- dropped all uses of "a = b = c"

Changes since v3:
- reduced scope to x86 only
- broke changes into a smaller chunks with a linear progression
- concerns about deconflicting with Arm deferred
- conversion from mb1 to boot modules no longer attempted at entry points
- the temporary conversion function is now the permenant means to convert
- incorporated suggestion from Andy Cooper for handling bootstrap_map

Changes since v2:
- combined v2 patches 7 and 8 for common review
- rebased the v2 series onto the current tip of staging (sorry)
- fixed the placement of the patch changelogs
- provided the changes description in the cover letter

Changes since v1:
- the v2 and v3 series implement functionality from v1 patches 2-4
- v2 series objective is to enable efficient patch review in support of merging the functionality into the hypervisor. It implements a subset of the v1 series, incorporating changes from community feedback.
- the bootstrap map is made accessible early in the v2 series via both multiboot and boot module arguments until later in the series where multiboot use is retired. This allows for incremental conversion across several patches from multiboot to boot modules.
- the 32-bit x86 boot environment header is removed, and changes are made to allow the new common bootinfo headers to be used instead.
- Arm and RISC-V architecture bootinfo headers are added to ensure that builds on those architectures can complete correctly.
- The KConfig patch to set the maximum number of boot modules allowed is not included in this series, replaced with a static maximum define.

Daniel P. Smith (12):
x86/boot: introduce boot module types
x86/boot: eliminate module_map
x86/boot: introduce boot module flags
x86/boot: introduce module release
x86/boot: move headroom to boot modules x86/boot: relocate kextra into boot info x86/boot: add cmdline_pa to struct boot_module x86/boot: convert domain construction to use boot info x86/boot: add start and size fields to struct boot_module x86/boot: introduce boot domain
x86/boot: introduce domid field to struct boot_domain x86/boot: add cmdline to struct boot_domain

 xen/arch/x86/cpu/microcode/core.c     |  23 +--
 xen/arch/x86/dom0_build.c             |  10 +-
 xen/arch/x86/hvm/dom0_build.c         |  46 ++---
 xen/arch/x86/include/asm/bootdomain.h |  37 ++++
 xen/arch/x86/include/asm/bootinfo.h   |  96 ++++++++++-
 xen/arch/x86/include/asm/dom0_build.h |  12 +-
 xen/arch/x86/include/asm/setup.h      |  10 +-
 xen/arch/x86/pv/dom0_build.c          |  72 ++++----
 xen/arch/x86/setup.c                  | 233 +++++++++++++++-----------
 xen/xsm/xsm_core.c                    |   5 +
 xen/xsm/xsm_policy.c                  |  18 +-
 11 files changed, 356 insertions(+), 206 deletions(-)
 create mode 100644 xen/arch/x86/include/asm/bootdomain.h
Signature · 1 line
2.30.2