Skip to content

Dynamic allocation of memory regions and IBM vTPM 2.0

Stefan Berger grub-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 8 repliesIn review
  2. v3 posting 2/26 patches 5 repliesSuperseded
  3. v3 posting 1/26 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v26 patches16 repliesSuperseded

Changes in v4 from the cover letter

- Removed #ifdef MM_DEBUG's from memtool module
- Using latest vec5 from Avnish

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ieee1275: request memory with ibm, client-architecture-supportgrub-core/kern/ieee1275/cmain.c grub-core/kern/ieee1275/init.c include/grub/ieee1275/ieee1275.h+180 -00 replies
2/6ieee1275: drop len -= 1 quirk in heap_initgrub-core/kern/ieee1275/init.c+0 -11 reply
3/6ieee1275: support runtime memory claimingdocs/grub-dev.texi grub-core/kern/ieee1275/init.c+257 -203 replies
4/6ieee1275: implement vec5 for cas negotiationgrub-core/kern/ieee1275/init.c+20 -10 replies
5/6Add memtool module with memory allocation stress-testconfigure.ac grub-core/Makefile.core.def grub-core/commands/memtools.c +1 more+163 -00 replies
6/6ibmvtpm: Add support for trusted boot using a vTPM 2.0docs/grub.texi grub-core/Makefile.core.def grub-core/commands/ieee1275/ibmvtpm.c +1 more+167 -11 reply

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDaniel KiperStefan BergerDaniel AxtensRobbie HarwoodNageswara R Sastry
SeriesR-b R-b T-b
1/6R-b
2/6R-b R-b
3/6T-b R-b
4/6A-b
5/6R-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v4 thread

Cover letter [PATCH v4 0/6] Dynamic allocation of memory regions and IBM vTPM 2.0

Hello,

This is an addition to the series sent from Daniel Axtens
(https://lists.gnu.org/archive/html/grub-devel/2022-04/msg00064.html).

Patch 'ieee1275: request memory with ibm,client-architecture-support' implements vectors 1-4 of client-architecture-support negotiation However, during some tests, we found this can be a problem if:

- we have more than 64 CPUs
- Hardware Management Console (HMC) is configured to minimum of CPUs >64 (for example, min of 200 CPUs)
- Grub needs to request memory.

If vector 5 is not implemented, Power Hypervisor will consider the default value for vector 5 and 64 will bet set as the maximum number of CPUs supported by the OS, causing the machine to fail to init. Today we support 256 CPUs (max) on Power, so we need to implement vector 5 and set the MAX CPUs bits to this value.

Add an IBM/ieee1275 vTPM 2.0 driver that requires the preceeding memory patches due to the grub's TPM subsystem needing large chunks of memory for hashing of files such as initrd and kernel.

Stefan

v4:
- Removed #ifdef MM_DEBUG's from memtool module
- Using latest vec5 from Avnish

v3:
- Added #if defined(__powerpc__) [1/6]
- Address possible integer underlow [3/6]
- Added comment why tpm_init() function cannot be called from GRUB_MOD_INIT()
- Added Reviewed-by tags to {1,2,5,6}/6

v2:
- Followed Daniel K.'s list of suggestions checking the list more than twice and adjusted formatting, line breaks, etc. in all patches
- Conditional compilation of ppc64-specific code using #ifdef __powerpc__
- Fixing of installation of memtool; adding of warning message for __powerpc__ since it requires a reboot after running memory stress test
- Tested it on i386-pc and PowerKVM

Daniel Axtens (4):
ieee1275: request memory with ibm, client-architecture-support
ieee1275: drop len -= 1 quirk in heap_init
ieee1275: support runtime memory claiming
Add memtool module with memory allocation stress-test

Diego Domingos (1):
ieee1275: implement vec5 for cas negotiation

Stefan Berger (1):
ibmvtpm: Add support for trusted boot using a vTPM 2.0

 configure.ac                          |   1 +
 docs/grub-dev.texi                    |   7 +-
 docs/grub.texi                        |   3 +-
 grub-core/Makefile.core.def           |  13 +
 grub-core/commands/ieee1275/ibmvtpm.c | 155 +++++++++
 grub-core/commands/memtools.c         | 152 +++++++++
 grub-core/kern/ieee1275/cmain.c       |   5 +
 grub-core/kern/ieee1275/init.c        | 445 +++++++++++++++++++++++++-
 grub-core/kern/mm.c                   |   4 +
 include/grub/ieee1275/ieee1275.h      |  13 +
 10 files changed, 781 insertions(+), 17 deletions(-)
 create mode 100644 grub-core/commands/ieee1275/ibmvtpm.c
 create mode 100644 grub-core/commands/memtools.c
Signature · 1 line
2.25.1