[SRU][J][PATCH v2 0/1] Fix bugs preventing boot on Intel TDX-enabled hosts
Ian Whitfield
ian.whitfield at canonical.com
Wed Feb 12 02:37:41 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2097811
SRU Justification:
[Impact]
Google has requested an upstream fix to enable the boot of 5.15 kernel
instances on their Intel TDX enabled infrastructure. The fix is
described as preventing the recalculation of physical address width of
the cpu during boot in a few select places, presumably using a more
consistent and accurate value throughout the boot process.
[Fix]
There were a large number of unrelated conflicts resolved by adjusting
the context around the changes in the patch. One conflict did have a
direct impact on the patch, but it was resolved by tracing where a
function call had been moved, and making the original changes there.
This patch was originally targeting the Jammy linux-gcp kernel, but the
same patch applies to the generic kernel. For this reason, a separate
thread was made for each kernel such that linux-gcp can get the patch
early and after the generic patch window has already closed, but the
same patch can be reviewed and applied to generic at a later time and
with more strict oversight.
[Test Plan]
Google reported inability to boot Focal images (which use a backport of
this kernel) on a specific configuration in a deployment zone where
Intel TDX was enabled. This patchset was tested by booting a Jammy image
on one such machine (which uses the 6.8 kernel), installing this patched
kernel, and booting into it. Before this patch is applied, the installed
kernel doesn't finish the boot process, and after the patch is applied,
it boots as normal.
This test was completed with the Jammy linux-gcp kernel because it
includes drivers for the test configuration's network interface which
generic does not have. There isn't a difference between the two kernels
that I'm aware of that would indicate the test does not also apply to
generic.
[Where problems could occur]
As these changes affect booting and the kernel's understanding of the
cpu, an error in the backporting of this patch could cause the user
to be unable to boot the kernel. The patch was primarily modified in
the MTRR cleanup feature, which can be disabled with a kernel parameter.
If the fixes don't work, we would see the kernel continue to not be
bootable on TDX-enabled hosts.
v2: Removed additional cherry-picked commit that was not necessary and
required more of a backport effort.
Juergen Gross (1):
x86/mtrr: Remove physical address size calculation
arch/x86/kernel/cpu/mtrr/cleanup.c | 16 ++++----
arch/x86/kernel/cpu/mtrr/generic.c | 12 +++++-
arch/x86/kernel/cpu/mtrr/mtrr.c | 61 ++++--------------------------
arch/x86/kernel/cpu/mtrr/mtrr.h | 4 +-
4 files changed, 29 insertions(+), 64 deletions(-)
--
2.43.0
More information about the kernel-team
mailing list