Linux 6.8 Upstreams More Intel TDX Bits For Protecting KVM Guests

Written by Michael Larabel in Intel on 12 January 2024 at 06:01 AM EST. Add A Comment
INTEL
Intel has prepared additional Trust Domain Extensions enablement code for the ongoing Linux 6.8 kernel merge window.

TDX is now broadly available with new 5th Gen Xeon "Emerald Rapids" processors while the mainline Linux kernel support for these encrypted/secured VMs is still preparing to cross the finish line. TDX was first introduced last year with Intel Sapphire Rapids processors but the feature availability was limited to major cloud service providers / hyperscalers.

Intel Emerald Rapids CPUs


For this latest pull request is the TDX-side work so that KVM can run TDX-protected guests but the KVM-side changes are still pending. Longtime Intel Linux engineer Dave Hansen explained:
"Please pull some x86/tdx changes for 6.8. This contains the initial support for host-side TDX support so that KVM can run TDX-protected guests. This does not include the actual KVM-side support which will come from the KVM folks. The TDX host interactions with kexec also needs to be ironed out before this is ready for prime time, so this code is currently Kconfig'd off when kexec is on.

The majority of the code here is the kernel telling the TDX module which memory to protect and handing some additional memory over to it to use to store TDX module metadata. That sounds pretty simple, but the TDX architecture is rather flexible and it takes quite a bit of back-and-forth to say, "just protect all memory, please."

There is also some code tacked on near the end of the series to handle a hardware erratum. The erratum can make software bugs such as a kernel write to TDX-protected memory cause a machine check and masquerade as a real hardware failure. The erratum handling watches out for these and tries to provide nicer user errors."

More details on the Intel TDX code prepped for Linux 6.8 via this pull request.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week