grub-devel
[Top][All Lists]
Advanced

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

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


From: Nageswara R Sastry
Subject: Re: [PATCH v4 0/6] Dynamic allocation of memory regions and IBM vTPM 2.0
Date: Mon, 13 Feb 2023 12:58:23 +0000

Tested this patch series with different values of initrd/initramfs and when 
vTPM is enabled.

Not seen any 'Grub OOM' with 541MB (total of initrd + vmlinux). Beyond I 
couldn't test due to disk space issues.

Thank You. 

Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>

...

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

--
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]