> Hardware-poisoned page frames are tracked only in the running kernel's > data structures, so a kexec loses them and the next kernel doesn't have > this information, thus, tripping into them again. > > Add an EFI configuration table to carry that information across kexec. > > It is a bitmap with one bit per EFI_POISON_UNIT_SIZE (2MiB) of physical > memory starting at phys_base, modeled on the LINUX_EFI_UNACCEPTED_MEMORY > table, and it rides the EFI system table to every kernel in the chain. > Basing the bitmap keeps a machine whose RAM starts high from paying for > the hole below it. > > List the table in the x86 efi_tables[] too, so an SME host maps it > unencrypted like every other EFI table. > > [ ... ] > > This is a similar approach as used as unaccepted memory. > > Suggested-by: Kiryl Shutsemau <[email protected]> > Signed-off-by: Breno Leitao <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2
