-
Notifications
You must be signed in to change notification settings - Fork 103
Add preliminary Intel TDX support [v2] #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There are two outstanding issues, but the limitations are documented in the README:
|
a8c3e57
to
f60a0f3
Compare
@tylerfanelli @MatiasVara @slp feel free to review whenever you're ready. I'm just trying to figure out how to debug the issues I listed above at the moment. |
7376e1e
to
6ec624b
Compare
Update the binary so a TDX guest does not attempt attestation. Generated from work done in containers/libkrun#355 Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
@jakecorrenti LGTM, could you please rebase it? |
In the IOAPIC constructor, only enable the SPLIT IRQCHIP capability on non-tdx flavors. The TDX flavor will enable the necessary capabilities for the system on Vm creation. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
TDX requires the IRQCHIP to be split between the guest and the host. Enable the functionality in the launch-tee test. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Fixed! |
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Some of the pre-existing feature checks in the `vmm` crate, whether `tee` or `amd-sev`, are not compatible with the `tdx` feature. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Ensure the -tdx flavor links with the correct libkrunfw flavor, which in this case is libkrunfw-tdx. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
The registers and APIC state on TDX systems are considered "protected", therefore we cannot configure them at all through the KVM API. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Adds a new `inteltdx` module and implements a TDX implementation for `Vm::new()` Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
TDX requires the number of 4k pages and the number of vCPUs to be specified in the boot parameters differently than the other `tee` architectures. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
TDX starts execution in 32-bit protected mode, not 16-bit real mode. Change the reset vector to reflect that. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Retrieve the TDX capabilities KVM supports with the current TDX module the system has loaded and perform TDX specific VM initialization. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
After the vCPUs have been created with KVM, add them to the TDX launcher and then do the necessary initialization. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Initialize the guest private memory for each of the measured regions created. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Set up the worker thread so the TDX guest is able to convert memory from shared -> private or private -> shared when a hypercall is made or a memory fault occurs. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
When the vCPU exits with VcpuExit::MemoryFault, ensure that we are checking the exit flag has the private bit set to 1 before attempting to convert any memory. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Document how to compile and install the TDX flavor of libkrun. Also document the limitations of multiprocessing and memory. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Do not attest with the libkrun-tdx flavor. Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Update the binary so a TDX guest does not attempt attestation. Generated from work done in containers/libkrun#355 Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This pull request adds support for Intel Trust Domain eXtensions (TDX), another hardware Trusted Execution Environment architecture.
Note: this pull request does not support attestation.