Skip to content
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

tdx: Update TDX artefacts to be used with the Ubuntu 23.10 / CentOS 9 stream OSVs. #8840

Conversation

fidencio
Copy link
Member

As host side patches of TDX are being shipped by distros like Ubuntu, CentOS Stream, and SuSE, let's take advantage of this and switch to using those, while on the guest side we rely on the upstream content (kernel 6.7, which has everything we need).

Please, take a look at each commit in the series for further details.

@fidencio fidencio force-pushed the topic/update-tdx-artefacts-to-the-new-host-os branch 4 times, most recently from 2ce2a57 to 8ed1d1f Compare January 18, 2024 13:25
@fidencio fidencio marked this pull request as draft January 19, 2024 22:13
@fidencio fidencio force-pushed the topic/update-tdx-artefacts-to-the-new-host-os branch 2 times, most recently from a7fb8e5 to aaba4fb Compare February 22, 2024 13:42
@fidencio fidencio changed the title tdx: Update TDX artefacts to be used with the Ubuntu 23.10 OSV. tdx: Update TDX artefacts to be used with the Ubuntu 23.10 / CentOS 9 stream OSVs. Feb 22, 2024
@fidencio fidencio force-pushed the topic/update-tdx-artefacts-to-the-new-host-os branch 2 times, most recently from adfb786 to 47a03cf Compare February 28, 2024 12:17
@katacontainersbot katacontainersbot added size/huge Largest and most complex task (probably needs breaking into small pieces) and removed size/large Task of significant size labels Feb 28, 2024
@fidencio fidencio force-pushed the topic/update-tdx-artefacts-to-the-new-host-os branch 6 times, most recently from 3b48289 to d53ef51 Compare February 29, 2024 16:32
@fidencio fidencio force-pushed the topic/update-tdx-artefacts-to-the-new-host-os branch from d53ef51 to bf00546 Compare April 2, 2024 12:43
@katacontainersbot katacontainersbot added size/large Task of significant size and removed size/huge Largest and most complex task (probably needs breaking into small pieces) labels Apr 2, 2024
Let's update the QEMU to the one that's officially maintained by Intel
till all the TDX patches make their way upstream.

We've had to also update python to explicitly use python3 and add
python3-venv as part of the dependencies.

Fixes: kata-containers#8810

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
The private=on|off knob is required in order to properly lauunch a TDX
guest VM.

This is a brand new property that is part of the still in-flight patches
adding TDX support on QEMU.

Please, see:
intel-staging/qemu-tdx@3fdd807

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This reverts commit d1b54ed.

 Conflicts:
	src/runtime/virtcontainers/qemu.go

This commit was a hack that was needed in order to get QEMU + TDX to
work atop of the stack our CI was running on.  As we're moving to "the
officially supported by distros" host OS, we need to get rid of this.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
@fidencio fidencio force-pushed the topic/update-tdx-artefacts-to-the-new-host-os branch from 7cce588 to 3200af0 Compare April 5, 2024 08:24
@fidencio fidencio marked this pull request as ready for review April 5, 2024 14:31
@fidencio
Copy link
Member Author

fidencio commented Apr 5, 2024

/test

This commit is a mess, but I'm not exactly sure what's the best way to
make it less messy, as we're getting QEMU TDX to work while partially
reverting 1e34220.

With that said, let me cover the content of this commit.

Firstly, we're reverting all the changes related to
"memory-backend-memfd-private", as that's what was used with the
previous host stack, but it seems it
didn't fly upstream.

Secondly, in order to get QEMU to properly work with TDX, we need to
enforce the 'private=on' knob and use the "memory-backend-ram", and
we're doing so, and also making sure to test the `private=on` newly
added knob.

I'm sorry for the confusion, I understand this is not optimal, I just
don't see an easy path to do changes without leaving the code broken
during those changes.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This is done in order to match the example from:
https://github.com/intel/tdx-linux/wiki/Instruction-to-set-up-TDX-host-and-guest#build-tdvf-image

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
Let's rely on the kvm module 'tdx' parameter to do so.
This aligns with both OSVs (Canonical, Red Hat, SUSE) and the TDX
adoption (https://github.com/intel/tdx-linux) stacks.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
@fidencio fidencio force-pushed the topic/update-tdx-artefacts-to-the-new-host-os branch from 3200af0 to cdb8531 Compare April 5, 2024 17:51
@fidencio
Copy link
Member Author

fidencio commented Apr 5, 2024

/test

Copy link
Contributor

@cmaf cmaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fidencio LGTM

@fidencio fidencio merged commit f09bb98 into kata-containers:main Apr 5, 2024
294 of 306 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/large Task of significant size
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants