Commit Graph

1040 Commits

Author SHA1 Message Date
Hyounggyu Choi
a7d8c7788d Merge pull request #6245 from BbolroC/fix-protoc-s390x
CCv0: install protobuf-compiler explicitly in shim-v2 Dockerfile
2023-02-13 16:02:40 +01:00
Archana Shinde
56e5dc7cce Merge pull request #6233 from jepio/jepio/remove-duplicate-env
osbuilder: remove duplicate KATA_BUILD_CC entry
2023-02-09 11:46:28 -08:00
Hyounggyu Choi
10603e3def CCv0: install protobuf-compiler explicitly in shim-v2 Dockerfile
This is to install a missing binary protoc in shim-v2 Dockerfile.

Fixes: #6244

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-02-09 11:45:32 +01:00
Jeremi Piotrowski
f5febe4fe1 osbuilder: remove duplicate KATA_BUILD_CC entry
KATA_BUILD_CC is already getting passed 10 lines above.

Fixes: #6237
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2023-02-07 18:41:01 +01:00
Georgina Kinge
b95440712d Merge pull request #6182 from GeorginaKin/CCv0
CCv0: Merge main into CCv0 branch
2023-02-07 15:53:41 +00:00
Fabiano Fidêncio
55dcaa22e1 Merge pull request #6158 from fidencio/topic/CCv0-enable-runtime-rs
CC | Take runtime-rs into consideration when building and caching the shim-v2 tarball
2023-02-07 15:34:02 +01:00
Hyounggyu Choi
b399c72690 CI: Set docker version to v20.10 in ubuntu:20.04 for s390x|ppc64le
This is to make a docker version to v20.10 in docker upstream image ubuntu:20.04 for s390x and ppc64le.

Fixes: #6211
Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
Cherry-picked: f49b89b
2023-02-04 09:51:17 +00:00
Ryan Savino
d6c12476fb versions: downgrade qemu from 7.2.0 to 7.1.0
A known bug in qemu 7.2.0 causes a problem handling the kernel hashes argument and causes SEV container launching to fail.

Fixes: #6189

Signed-Off-By: Ryan Savino <ryan.savino@amd.com>
2023-02-02 08:23:43 -06:00
Georgina Kinge
5b4075d18a CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #6181
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2023-02-01 10:10:40 +00:00
Fabiano Fidêncio
7345c14caa caching: Take runtime-rs into consideration when caching shim-v2
Now that TDX work will start coming for runtime-rs, let's also take it
into consideration when caching the shim-v2 tarball.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-30 14:12:26 +01:00
Fabiano Fidêncio
0f43ec8ff7 Revert "packaging: Don't build runtime-rs if no RUST_VERSION is provided"
This reverts commit 299829aec0, as we'll
start adding TDX support for the runtime-rs.
2023-01-30 14:00:31 +01:00
Fabiano Fidêncio
0b3c91d2a2 kata-deploy: Add kernel-dragonball-experimental target
As Chao Wu added the support for building the dragonball kernel as a new
experimental kernel, let's make sure we reflect that as part of the
kata-deploy build scripts.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-28 10:55:39 +01:00
Steve Horsman
d3547814e5 Merge pull request #6104 from stevenhorsman/remove-skopeo-umoci
CC: Remove skopeo umoci
2023-01-27 10:31:33 +00:00
Fabiano Fidêncio
420203f054 Merge pull request #6120 from UnmeshDeodhar/CC-Cache-SEV-firmware
Adding caching capability for SEV ovmf
2023-01-27 08:47:30 +01:00
stevenhorsman
e777860a0c osbuilder: Make skopeo version externalised
- Remove the hardcoded skopeo version arg
- Switch to read from version.yaml and pass via --build-arg

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
9c75d43aef kata-deploy: Update cache version
- Remove skopeo & umoci from cache version now they aren't built
into the rootfs image

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
ebffb7bc9b kata-deploy: Remove skopeo and umoci
- Now we don't need skopeo and umoci in the rootfs
remove the option from kata-deploy

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
stevenhorsman
dd2d6a94f1 osbuilder: Remove option to build skopeo, umoci
Now we don't need to have skopeo and umoci in the rootfs
remove the code that optionally builds and installs them

Fixes: #3970
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00
Megan Wright
36cd741943 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #6126
Signed-off-by: Megan Wright megan.wright@ibm.com
2023-01-25 11:23:18 +00:00
Unmesh Deodhar
32a6bf570a cache_components: Adding caching capability for SEV ovmf
These changed will be consumed by SEV firmware caching job in the CI. This will help in reducing the CI runtime.

Fixes: #6119

Signed-off-by: Unmesh Deodhar <udeodhar@amd.com>
2023-01-24 15:00:18 -06:00
Fabiano Fidêncio
676d028504 versions: Bump QEMU to v7.2.0
As QEMU released its v7.2.0 version in December last year, last do the
bump on our side.

A few configuration options have been removed between the v6.2.0 (the
version we currently use) and v7.2.0, so those have also been dropped
from our configure-hypervison.sh script (for this specific version).

Also, we're explicitly setting --disable-virtiofsd for the platforms
that we're testing using the rust version.
See: a8d6abe129/docs/about/deprecated.rst (virtiofsd)

Fixes: #6102

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-18 13:11:12 +01:00
Steve Horsman
3a46a80fc2 Merge pull request #6034 from fidencio/topic/CC-consider-toolchain-version-for-td-shim-builder-image
CC | packaging: Take toolchain version when using the td-shim builder image
2023-01-11 17:26:08 +00:00
Hyounggyu Choi
c7148dc2c7 CC: Support s390x for target cc-payload in Makefile
This is to adjust dependencies for a target cc-payload based on
architecture.

Fixes: #6028

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
2023-01-11 13:25:33 +01:00
Fabiano Fidêncio
8125f5dc97 packaging: Take toolchain version when using the td-shim builder image
As the toolchain is installed in the image itself, we *must* take the
toolchain into consideration when deciding whether to use a cached image
or building a new one.

Fixes: #6033

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-11 12:14:48 +01:00
Alex Carter
db22befd78 osbuilder: copy efi_secret module for online_sev_kbc
Bug fix for #5651. Faulty bash syntax let a initrd build complete, but not copy the kernel module.
This change fixes the if logic to work as an 'or' as intended.

Fixes: #6024
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2023-01-10 19:04:46 +00:00
Gabriela Cervantes
f8a93a1ded tools: Fix indentation for setup aks script
This PR fixes the indentation for setup aks script being used
in tools.

Fixes #6013

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-01-09 15:27:50 +00:00
Georgina Kinge
e8c63ccc4d CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #6011
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2023-01-09 12:02:48 +00:00
Alex Carter
1b86be65f2 osbuilder: Switch to online_sev_kbc
Adds AA_KBC option in rootfs builder to specify online_sev_kbc into the initrd.
Guid and secret type for sev updated in shim makefile to generate default config
KBC URI will be specified via kernel_params
Also changing the default option for sev in the local build scipts
Making sure sev guest kernel module is copied into the initrd. Will also eventually be needed for SNP

Fixes: #5650
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2023-01-04 04:04:13 +00:00
Bin Liu
5b11201848 Merge pull request #5945 from liubin/fix/5944-indents
packaging: fix indents in build-kernel.sh
2023-01-04 11:00:49 +08:00
Fabiano Fidêncio
156e4e673b Merge pull request #5908 from Alex-Carter01/kmod_warning
kernel: adding kmod to do docker env
2023-01-03 20:35:22 +01:00
Fabiano Fidêncio
7da3635595 Merge pull request #5910 from Alex-Carter01/module_rootfs_fix
osbuilder: fix kernel module copy logic in rootfs builder
2023-01-03 17:34:20 +01:00
Bin Liu
0fe24e08bb packaging: fix indents in build-kernel.sh
In the function get_kernel, the indents are two tabs,
which should be 1 tab.

Fixes: #5944

Signed-off-by: Bin Liu <bin@hyper.sh>
2022-12-22 14:56:06 +08:00
Megan Wright
e2341c1b33 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #5932
Signed-off-by: Megan Wright <megan.wright@ibm.com>
2022-12-20 09:34:27 +00:00
Fabiano Fidêncio
1ee684021d Merge pull request #5906 from GeorginaKin/CCv0
CCv0: Merge main into CCv0 branch
2022-12-17 22:31:45 +01:00
Alex Carter
ecb28e2b13 kernel: adding kmod to do docker env
adding kmod to kernel building docker env to remove warning

Fixes: #5866
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-12-16 17:02:47 +00:00
Alex Carter
9f465a58af kernel: Add "unload" module to SEV config
Fixes: #5866
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-12-16 16:56:56 +00:00
Wainer Moschetta
a851982f71 Merge pull request #5893 from Alex-Carter01/ovmf-fix
CC: static build switching sev ovmf to CC fork
2022-12-16 09:58:32 -03:00
Alex Carter
8c96bd5c7c CC: static build switching sev ovmf to CC fork
Switching sev build of ovmf to the cc fork until patches are upstreamed.

Adding build for dependencies

Fixes: #5892
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-12-15 16:46:25 +00:00
Alex Carter
bd17c7143c osbuilder: fix kernel module copy logic in rootfs builder
the switch to cases lets AA_KBC to be parsed correctly.

There will be an addition to the offline_sev_kbc case to do the same for online_sev_kbc

There will also be an addition for SNP

Fixes: #5909
Signed-off-by: Alex Carter <Alex.Carter@ibm.com>
2022-12-15 15:46:39 +00:00
Fabiano Fidêncio
1d266352ea Merge pull request #5902 from Bevisy/fix-too-many-git-file
tools: Add some new gitignore items
2022-12-15 11:29:32 +01:00
Peng Tao
7210905deb Merge pull request #5712 from openanolis/chao/upcall
Dragonball: introduce upcall
2022-12-15 14:44:56 +08:00
Georgina Kinge
332a425145 CCv0: Merge main into CCv0 branch
Merge remote-tracking branch 'upstream/main' into CCv0

Fixes: #5905
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2022-12-14 14:55:23 +00:00
Binbin Zhang
ae0dcacd4a tools: Add some new gitignore items
Add some new ignore items to avoid local builds that cause git to track a lot of files

Fixes: #5900

Signed-off-by: Binbin Zhang <binbin36520@gmail.com>
2022-12-14 11:38:23 +08:00
GabyCT
b637d12d19 Merge pull request #5884 from GabyCT/topic/fixbuildscript
tools: Fix indentation on build kernel script
2022-12-13 15:28:24 -06:00
Fabiano Fidêncio
f1381eb361 Merge pull request #4813 from ManaSugi/fix/add-selinux-agent
runtime,agent: Add SELinux support for containers inside the guest
2022-12-13 11:24:53 +01:00
Chao Wu
a81ced0e3f upcall: add upcall into kernel build script
In order to let upcall being used by Kata Container, we need to add
those patches into kernel build script.

Currently, only when experimental (-e) and hypervisor type dragonball
(-t dragonball) are both enabled, that the upcall patches will be
applied to build a 5.10 guest kernel.

example commands: sh ./build-kernel.sh -e -t dragonball -d setup

fixes: #5642

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2022-12-13 15:44:55 +08:00
Chao Wu
f5c34ed088 Dragonball: introduce upcall
Upcall is a direct communication tool between VMM and guest developed
upon vsock. The server side of the upcall is a driver in guest kernel
(kernel patches are needed for this feature) and it'll start to serve
the requests after the kernel starts. And the client side is in
Dragonball VMM , it'll be a thread that communicates with vsock through
uds.

We want to keep the lightweight of the VM through the implementation of
the upcall, through which we could achieve vCPU hotplug, virtio-mmio
hotplug without implementing complex and heavy virtualization features
such as ACPI virtualization.

fixes: #5642

Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
2022-12-13 15:44:47 +08:00
Bin Liu
add2486259 Merge pull request #5853 from jongwu/test_kata3.0_arm
dragonball: enable kata3.0/dragonball CI on Arm
2022-12-13 11:05:17 +08:00
Fabiano Fidêncio
aef3e5184b kata-deploy-binaries: Use cached shim-v2 when possible
As done for different components, let's also use a cached version of the
shim-v2 whenever it's possible.

Fixes: #5838

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-12-12 20:07:32 +01:00
Gabriela Cervantes
de69f9c832 cache_components: Add the ability to cache the shim-v2
In order to cache the shim-v2 we're considering the the cached component
can be used if:
* There were no changes in the runtime directory
* There were no changes in the golang version used
* There were no changes in the rust version used
  * We don't build the rust agent, but better be prepared for the future
* There were no changes in the following files that are provided by the
  rootfs builds:
  * root_hash_vanilla.txt
  * root_hash_tdx.txt

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-12-12 19:12:26 +01:00