Commit Graph

9216 Commits

Author SHA1 Message Date
Fabiano Fidêncio
bff9f90d24 packaging: Add QEMU TDX targets as part of the cc targets
Let's add the QEMU TDX targets to be generated together with the cc
targets, when calling `make cc-tarball`.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-08 10:02:54 +02:00
Fabiano Fidêncio
0b34a8a186 kata-deploy-cc: Add QEMU support to be used with TDX
As the previous commit added a new runtime class to be used with TDX,
let's make sure this gets shipped and configured as part of the
kata-deploy-cc script, which is used by the Confidential Containers
Operator.

This commit also cleans up all the extra artefacts that will be
installed in order to run the QEMU TDX workloads.

Fixes: #4832

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-08 10:00:33 +02:00
Fabiano Fidêncio
89a5faef7a runtime: Add configuration file for QEMU TDX
Let's add a new configuration file for using a QEMU (and all the needed
artefacts) that are TDX capable.

This PR extends the Makefile in order to provide variables to be set
during the build time that are needed for the proper configuration of
the VMM, such as:
* Specific kernel parameters to be used with TDX
* Specific kernel features to be used when using TDX
* Artefacts path for the artefacts built to be used with TDX
  * QEMU
  * Kernel
  * TDVF

The reason we don't hack into the current QEMU configuration file is
because we want to ship both configurations, with for the non-TEE use
case and one for the TDX use case.

Fixes: #4830

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-08 09:54:48 +02:00
GabyCT
4f49423c91
Merge pull request #4811 from fidencio/topic/cc-build-and-ship-tdvf-and-td-shim
CC | packaging: Build and ship TDVF and TD-shim
2022-08-03 15:50:46 -05:00
Fabiano Fidêncio
4cf502fb20 packaging: Build and ship TD-shim
We're adding a new target for building TD-shim, a firmware used with
Cloud Hypervisor to start TDX capable VMs for CC.

Fixes: #4780

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-03 15:36:36 +02:00
Fabiano Fidêncio
9d0d5b9361 packaging: Build and ship TDVF
We're adding a new target for building a TDVF, a firmware used with QEMU
to start TDX capable VMs for CC.

Fixes: #4625

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-03 15:24:55 +02:00
Fabiano Fidêncio
04be5521d0 packaging: Reorganise TDX targets
Let's simply add the tdx targets after the CC ones.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-03 15:10:03 +02:00
Fabiano Fidêncio
554dff20c3 td-shim: Adjust final tarball location
Let's create the td-shim tarball in the directory where the script was
called from, instead of doing it in the $DESTDIR.

This aligns with the logic being used for creating / extracting the
tarball content, which is already in use by the kata-deploy local build
scripts.

Fixes: #4809

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-03 15:10:03 +02:00
Fabiano Fidêncio
9259646235 ovmf: Adjust final tarball location
Let's create the OVMF tarball in the directory where the script was
called from, instead of doing it in the $DESTDIR.

This aligns with the logic being used for creating / extracting the
tarball content, which is already in use by the kata-deploy local build
scripts.

Fixes: #4808

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-03 15:10:02 +02:00
Georgina Kinge
91cae52fe3
Merge pull request #4801 from GeorginaKin/CCv0
CCv0: Merge main into CCv0 branch
2022-08-03 11:58:04 +01:00
Georgina Kinge
a924faeead CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #4800
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2022-08-03 09:44:12 +01:00
Fabiano Fidêncio
a19321f5ad
Merge pull request #4751 from Megan-Wright/CCv0
CCv0: Merge main into CCv0 branch
2022-08-02 19:24:02 +02:00
Chelsea Mafrica
873e75b915
Merge pull request #4773 from fidencio/topic/build-tdvf
packaging: Add support for building TDVF
2022-08-02 09:14:13 -07:00
Megan Wright
7f71cdc290 Fix clippy errors 2022-08-02 10:26:18 +01:00
Fabiano Fidêncio
c9b5bde30b versions: Track and build TDVF
TDVF is the firmware used by QEMU to start TDX capable VMs.  Let's start
tracking it as it'll become part of the Confidential Containers sooner
or later.

TDVF lives in the public https://github.com/tianocore/edk2-staging repo
and we're using as its version tags that are consumed internally at
Intel.

Fixes: #4624

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-02 09:51:47 +02:00
Fabiano Fidêncio
e6a5a5106d packaging: Generate a tarball as OVMF build result
Instead of having as a result the directory where OVMF artefacts where
installed, let's follow what we do with the other components and have a
tarball as a result of the OVMF build.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-02 09:48:59 +02:00
Fabiano Fidêncio
42eaf19b43 packaging: Simplify OVMF repo clone
Instead of cloning the repo, and then switching to a specific branch,
let's take advantage of `--branch` and directly clone the specific
branch / tag.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-02 09:48:59 +02:00
Fabiano Fidêncio
4d33b0541d packaging: Don't hardcode "edk2" as the cloned repo's dir.
As TDVF comes from a different repo, the edk2-staging one, we cannot
simply hardcode the name.  Instead, let's get the name of the directory
from name of the git repo.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-02 09:48:59 +02:00
Fabiano Fidêncio
7503bdab6e
Merge pull request #4783 from fidencio/topic/build-td-shim
versions: Track and add support for building TD-shim
2022-08-01 20:50:58 +02:00
Megan Wright
c13380ba69 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #4750
Depends-on: github.com/kata-containers/tests#4971
Signed-off-by: Megan Wright megan.wright@ibm.com
2022-08-01 16:29:50 +01:00
Fabiano Fidêncio
b06bc82284 versions: Track and add support for building TD-shim
TD-shim is a simplified TDX virtual firmware, used by Cloud Hypervisor,
in order to create a TDX capable VM.

TD-shim is heavily under development, and is hosted as part of the
Confidential Containers project:
https://github.com/confidential-containers/td-shim

The version chosen for this commit, is a version that's being tested
inside Intel, but we, most likely, will need to change it before we have
it officially packaged as part of an official release.

Fixes: #4779

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-08-01 16:36:12 +02:00
Bin Liu
8d9135a7ce
Merge pull request #4765 from ryansavino/ccv0-rust-upgrade
versions: Upgrade rust version
2022-08-01 17:15:05 +08:00
Ryan Savino
9b1940e93e versions: update rust version
Fixes #4764

versions: update rust version to fix ccv0 attestation-agent build error
static-checks: kata tools, libs, and agent fixes

Signed-Off-By: Ryan Savino <ryan.savino@amd.com>
2022-07-29 18:41:43 -05:00
Peng Tao
0aefab4d80
Merge pull request #4739 from liubin/fix/4738-trace-rpc-calls
agent: log RPC calls for debugging
2022-07-29 14:18:23 +08:00
Fabiano Fidêncio
54147db921
Merge pull request #4170 from Alex-Carter01/build-amdsev-ovmf
Add support AmdSev build of OVMF
2022-07-28 19:42:50 +02:00
Alex Carter
638c2c4164 static-build: Add AmdSev option for OVMF builder
Introduces new build of firmware needed for SEV

Fixes: kata-containers#4169

Signed-off-by: Alex Carter <alex.carter@ibm.com>
2022-07-28 09:56:06 -05:00
Alex Carter
f0b58e38d2 static-build: Add build script for OVMF
Introduces a build script for OVMF. Defaults to X86_64 build (x64 in OVMF)

Fixes: #4169

Signed-off-by: Alex Carter <alex.carter@ibm.com>
2022-07-28 09:07:49 -05:00
Bin Liu
a67402cc1f
Merge pull request #4397 from yaoyinnan/3073/ftr/host-cgroupv2
runtime: Support for host cgroupv2
2022-07-28 14:30:03 +08:00
Tim Zhang
229ff29c0f
Merge pull request #4758 from GabyCT/topic/updaterunc
versions: Update runc version
2022-07-28 14:12:58 +08:00
yaoyinnan
5c3155f7e2 runtime: Support for host cgroup v2
Support cgroup v2 on the host. Update vendor containerd/cgroups to add cgroup v2.

Fixes: #3073

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2022-07-28 10:30:45 +08:00
yaoyinnan
4ab45e5c93 docs: Update support for host cgroupv2
Currently cgroup v2 is supported. Remove the note that host cgroup v2 is not supported.

Fixes: #3073

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2022-07-28 10:30:44 +08:00
GabyCT
9dfd949f23
Merge pull request #4646 from amshinde/add-liburing-qemu
qemu: Add liburing to qemu build
2022-07-27 15:47:49 -05:00
Gabriela Cervantes
326eb2f910 versions: Update runc version
This PR updates the runc version to v1.1.0.

Fixes #4757

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-07-27 16:19:11 +00:00
Bin Liu
557229c39d
Merge pull request #4724 from yahaa/fix-docs
Docs: fix tables format error
2022-07-27 21:13:29 +08:00
Archana Shinde
1b01ea53d9
Merge pull request #4735 from nubificus/feature-fc-v1.1
versions: Update Firecracker version to v1.1.0
2022-07-27 04:50:32 +05:30
Peng Tao
27c82018d1
Merge pull request #4753 from Tim-Zhang/agent-fix-stream-fd-double-close
agent: Fix stream fd's double close
2022-07-27 00:54:07 +08:00
Bin Liu
6fddf031df
Merge pull request #4664 from lifupan/main
container: kill all of the processes in a container when it terminated
2022-07-26 23:12:11 +08:00
Tim Zhang
f5aa6ae467 agent: Fix stream fd's double close problem
The fd would be closed on Pipestream's dropping and we should
not close it agian.

Fixes: #4752

Signed-off-by: Tim Zhang <tim@hyper.sh>
2022-07-26 20:05:06 +08:00
yahaa
6e149b43f7 Docs: fix tables format error
Fixes: #4725

Signed-off-by: yahaa <1477765176@qq.com>
2022-07-26 19:05:09 +08:00
gntouts
56d49b5073 versions: Update Firecracker version to v1.1.0
This patch upgrades Firecracker version from v0.23.4 to v1.1.0

* Generate swagger models for v1.1.0 (from firecracker.yaml)
* Replace ht_enabled param to smt (API change)
* Remove NUMA-related jailer param --node 0

Fixes: #4673
Depends-on: github.com/kata-containers/tests#4968

Signed-off-by: George Ntoutsos <gntouts@nubificus.co.uk>
Signed-off-by: Anastassios Nanos <ananos@nubificus.co.uk>
2022-07-26 07:01:26 +00:00
liubin
0e24f47a43 agent: log RPC calls for debugging
We can log all RPC calls to the agent for debugging purposes
to check which RPC is called, which can help us to understand
the container lifespan.

Fixes: #4738

Signed-off-by: liubin <liubin0329@gmail.com>
2022-07-26 10:32:44 +08:00
Tim Zhang
e764a726ab
Merge pull request #4715 from Tim-Zhang/fix-ut-test_do_write_stream
agent: fix fd-double-close problem in ut test_do_write_stream
2022-07-25 17:34:26 +08:00
Tim Zhang
427b29454a
Merge pull request #4709 from liubin/fix/4708-unwrap-error
rustjail: check result to let it return early
2022-07-25 15:05:20 +08:00
Tim Zhang
0337377838
Merge pull request #4695 from liubin/4694/upgrade-nydus-version
upgrade nydus version
2022-07-25 15:05:04 +08:00
Wainer Moschetta
0b4a91ec1a
Merge pull request #4644 from bookinabox/optimize-get-paths
cgroups: remove unnecessary get_paths()
2022-07-22 17:01:01 -03:00
GabyCT
68c265587c
Merge pull request #4718 from GabyCT/topic/updatefirecrackerversion
versions: Update firecracker version
2022-07-21 14:26:57 -05:00
Gabriela Cervantes
df79c8fe1d versions: Update firecracker version
This PR updates the firecracker version that is being
used in kata CI.

Fixes #4717

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2022-07-21 16:10:29 +00:00
Tim Zhang
912641509e agent: fix fd-double-close problem in ut test_do_write_stream
The fd will closed on struct Process's dropping, so don't
close it again manually.

Fixes: #4598

Signed-off-by: Tim Zhang <tim@hyper.sh>
2022-07-21 19:37:15 +08:00
Georgina Kinge
6a77af527f
Merge pull request #4697 from GeorginaKin/CCv0
CCv0: Merge main into CCv0 branch
2022-07-21 11:59:23 +01:00
liubin
0d7cb7eb16 agent: delete agent-type property in announce
Since there is only one type of agent now, the
agent-type is not needed anymore.

Signed-off-by: liubin <liubin0329@gmail.com>
2022-07-21 14:53:01 +08:00