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

[RFC PATCH 0/4] Introducing a common representation of boot info


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Mon, 30 May 2022 22:41:22 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653950519; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=ZeXQSjEyyrrxxE3o1HiaJLRHDYVkRyJ+opFzPaTQpPQ=; b=fEuPcQ380F4ro17RpCSfYh5IkVnahTSVmVIjEjPdcM6snDJx5gyt/xCtb4oKh4UUlzscu8i+SjfKxre1Tshp1CNmukWkbzQAetj3JGDkJtCT58Dj7E/zUQEgh7Chrv4nGdnh3ZKiI82a3Om+9C0byrfdZLUJ/bRLg6YCfb6L5Xk=
  • Arc-seal: i=1; a=rsa-sha256; t=1653950519; cv=none; d=zohomail.com; s=zohoarc; b=D0Qso4mixIKrtc7HLC3FRexzKc7sYDK7eDIhXrtA/9JZzDD+ZHnF05fHP3bmyyina0D+Fhc/LpEATvi+ZnYgHX9QrLgtAw7ooJKBKfeNembm1WMucLB+8wjeUNbnQ8QMPFDeM5e3+8Rk/k1l/mEd0QMvqNKtNRhbMszvES/cmB0=
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, scott.davis@xxxxxxxxxx, christopher.clark@xxxxxxxxxx, sstabellini@xxxxxxxxxx
  • Delivery-date: Mon, 30 May 2022 22:51:38 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This series serves as a proposal to arrive at a common, cross-architecture way
for boot information to be represented during startup. This proposal is derived
from the structures devised to represent hyperlaunch boot information. The
hyperlaunch boot information structures themselves were based on the boot info
structures used by Arm and dom0less. A significant effort went into ensuring
the structures are able to support dom0less as well as hyperlaunch.

Arm and x86 both have arch specific information that must be represented. The
approach here sought to support this through arch structures while attempting
to maximize what was retained in the common structures. For this series, the
focus was on converting x86 over to the new boot info structures.

The motivation for this series is due to the fact that the multiboot v1
structures used by x86 are not sufficient for hyperlaunch. In the previously
submited hyperlaunch RFC, this was managed by wrapping the mb structures
inside⎄ the hyperlaunch structures. This at best was could be considered
crude, but really it was just a hack. One of the goals of hyperlaunch is to
unify as much as possible with dom0less to remove any unnecessary duplication.
Adopting a common representation for boot information will provide a solid
foundation for this unification. The added benefit is that in few places this
will enable an unnecessary arch specific version of logic, XSM for example
would be able to drop arch specific init functions.

This series being submitted as an RFC due to,  
* the number of design decisions being made within the series
* the limited testing able to be completed
* how extensive the changes will be for x86

NB: This series is built on top of the v2 patch series, "xsm: refactor and
optimize policy loading".


Daniel P. Smith (4):
  kconfig: allow configuration of maximum modules
  headers: introduce generalized boot info
  x86: adopt new boot info structures
  x86: refactor entrypoints to new boot info

 xen/arch/Kconfig                          |  12 ++
 xen/arch/arm/include/asm/setup.h          |   5 +-
 xen/arch/x86/boot/boot_info32.h           |  81 ++++++++
 xen/arch/x86/boot/defs.h                  |  17 +-
 xen/arch/x86/boot/reloc.c                 | 187 +++++++++++------
 xen/arch/x86/bzimage.c                    |  16 +-
 xen/arch/x86/cpu/microcode/core.c         | 134 ++++++++-----
 xen/arch/x86/dom0_build.c                 |  13 +-
 xen/arch/x86/efi/efi-boot.h               |  96 +++++----
 xen/arch/x86/guest/xen/pvh-boot.c         |  58 ++++--
 xen/arch/x86/hvm/dom0_build.c             |  42 ++--
 xen/arch/x86/include/asm/bootinfo.h       |  45 +++++
 xen/arch/x86/include/asm/bzimage.h        |   5 +-
 xen/arch/x86/include/asm/dom0_build.h     |  15 +-
 xen/arch/x86/include/asm/guest/pvh-boot.h |   6 +-
 xen/arch/x86/include/asm/setup.h          |  14 +-
 xen/arch/x86/pv/dom0_build.c              |  34 ++--
 xen/arch/x86/setup.c                      | 234 ++++++++++++----------
 xen/common/efi/boot.c                     |   4 +-
 xen/include/xen/bootinfo.h                | 101 ++++++++++
 xen/include/xsm/xsm.h                     |  26 ++-
 xen/xsm/xsm_core.c                        |  22 +-
 xen/xsm/xsm_policy.c                      |  44 ++--
 23 files changed, 804 insertions(+), 407 deletions(-)
 create mode 100644 xen/arch/x86/boot/boot_info32.h
 create mode 100644 xen/arch/x86/include/asm/bootinfo.h
 create mode 100644 xen/include/xen/bootinfo.h

-- 
2.20.1




 


Rackspace

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