Commit Graph

11844 Commits

Author SHA1 Message Date
Zhongtao Hu
a33a22ccd1 runtime-rs: add missing config section for share-fs
add missing config sections for share-fs

Fixes:#6020
Signed-off-by: Zhongtao Hu <zhongtaohu.tim@linux.alibaba.com>
2023-01-12 18:12:37 +08:00
Peng Tao
d7ca0393d1 runtime: fix up disable_netns handling
With `disable_netns=true`, we should never scan the sandbox netns which
is the host netns in such case.

Fixes: #6021
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
Cherry-picked: 12fd6ff
2023-01-12 08:57:20 +00:00
Peng Tao
2b4b825228
Merge pull request #6032 from liubin/fix/6031-add-test-file-to-gitignore
runtime: add test generated file to .gitignore
2023-01-12 15:38:46 +08:00
Peng Tao
4a4232b851
Merge pull request #6037 from bergwolf/github/no-netns
runtime: fix up disable_netns handling
2023-01-12 09:58:24 +08:00
Eric Ernst
e3d3b72fa2 virtcontainers: use resource control for setting CPU affinity
Let's abstract the CPU affinity, instead of calling linux only code from
sandbox.

Fixes: #6044

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2023-01-11 17:55:53 -08:00
Eric Ernst
f137048be3 resource-control: add helper function for setting CPU affinity
Let's abstract the CPU affinity

Fixes: #6044

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2023-01-11 17:55:53 -08:00
Eric Ernst
73216a8104 vendor: revendor netlink to get latest
This'll address issue where netlink couldn't build on Darwin hosts.

Fixes: #6026

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2023-01-11 17:23:15 -08:00
Gabriela Cervantes
fc17d7cc41 virtcontainers: Fix misspelling in error message
This PR fixes a misspelling in the error message when it tries to run
a system without Confidential computing support.

Fixes #6042

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2023-01-11 21:58:07 +00:00
GabyCT
c6b7f69040
Merge pull request #5837 from deagon/doc-fix
docs: add hint of probing loop module
2023-01-11 12:20:47 -06: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
Steve Horsman
cbf2753a28
Merge pull request #6038 from BbolroC/make-target-cc-payload
CC: Support s390x for target cc-payload in Makefile
2023-01-11 17:23:28 +00:00
Tim Zhang
c91b142587
Merge pull request #6035 from liubin/fix/5376-set-a-fixed-cgroups-version
tools: add --locked option for cargo install
2023-01-11 20:44:23 +08: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
Peng Tao
12fd6ffc1f runtime: fix up disable_netns handling
With `disable_netns=true`, we should never scan the sandbox netns which
is the host netns in such case.

Fixes: #6021
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2023-01-11 12:25:24 +00:00
Bin Liu
64c9114a39 tools: add --locked option for cargo install
There is a broken release of cgroup-rs, but cargo install will not use
the version in Cargo.lock, so add the `--locked` option to use the version
specified in the Cargo.toml

Fixes: #5376

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-11 19:34:46 +08: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
Bin Liu
7eb43cec15 runtime: add test generated file to .gitignore
Add test generated file to .gitignore to avoid making the
working directory dirty.

Fixes: #6031

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-11 17:16:06 +08:00
Bin Liu
8551853cfe runtime: use system pagesize for hugepage test
In TestHandleHugepages it will do a mount operation with different pagesizes,
but some systems only support 2M pagesize, test for a 1g pagesize will fail.

This commit try to fix by only mount pagesizes under `/sys/kernel/mm/hugepages`, which are
supported to mount by the OS.

Fixes: #6029

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-11 17:02:58 +08:00
Bin Liu
0ec4aa1a86
Merge pull request #6007 from jongwu/single_container
runtime-rs: add Single Container support
2023-01-11 10:55:50 +08:00
Eric Ernst
07e77f5be7
Merge pull request #5994 from dcantah/virtcontainers_tests_darwin
virtcontainers: tests: Ensure Linux specific tests are just run on Linux
2023-01-10 17:13:28 -08:00
Fabiano Fidêncio
147c56bb8d
Merge pull request #6019 from liubin/fix/6018-virtiofsd-cache-mod
Change cache mode from none to never
2023-01-10 23:12:13 +01:00
Fabiano Fidêncio
03631a4360
Merge pull request #6025 from Alex-Carter01/online_kbc_debug
osbuilder: copy efi_secret module for online_sev_kbc
2023-01-10 23:11:44 +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
Bin Liu
709483425f
Merge pull request #6014 from GabyCT/topic/fixinidentationaks
tools: Fix indentation for setup aks script
2023-01-10 17:49:27 +08:00
Bin Liu
8225d8044e
Merge pull request #6003 from dcantah/fs-skeleton
virtcontainers: fs_share: Add Darwin skeleton
2023-01-10 17:48:45 +08:00
Bin Liu
86a82cace9 runtime: change cache mode from none to never
New Rust virtiofsd's `cache` mode doesn't support `none` mode,
we should use `never` to replace it.

Fixes: #6018

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-10 17:29:48 +08:00
Bin Liu
82c59efd65 runtime-rs: change cache mode from none to never
New Rust virtiofsd's `cache` mode doesn't support `none` mode,
we should use `never` to replace it.

Fixes: #6018

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-10 16:14:59 +08:00
Bin Liu
7b309b578d kata-types: change cache mode from none to never
New Rust virtiofsd's `cache` mode doesn't support `none` mode,
we should use `never` to replace it.

Fixes: #6018

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-10 14:21:30 +08:00
Bin Liu
fee4e7c7c4 docs: change cache mode from none to never
New Rust virtiofsd's `cache` mode doesn't support `none` mode,
we should use `never` to replace it.

Fixes: #6018

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-10 14:19:25 +08:00
Eric Ernst
4d53303a7d
Merge pull request #6005 from dcantah/vfw-skeleton
virtcontainers: Add a Virtualization.framework skeleton
2023-01-09 15:50:04 -08:00
Archana Shinde
594b57d082 utils: Add utility functions to get cpu and distro details.
These functions is meant to be used for the kata-env command.

Fixes: #5688

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-01-09 14:36:36 -08:00
Archana Shinde
d33e343613 check: Move PROC_CPUINFO from architecture specific files
Move PROC_CPUINFO into check.rs. This file is used accross
architectures and does not need to be in arch-specific files.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2023-01-09 14:31:33 -08:00
Fabiano Fidêncio
ed59cebcbf
Merge pull request #6012 from GeorginaKin/CCv0
CCv0: Merge main into CCv0 branch
2023-01-09 22:51:33 +01: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
73532eb400 runtime: fixing merge conflicts
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2023-01-09 14:22:32 +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
Tim Zhang
6628891666
Merge pull request #5982 from liubin/fix/5981-remove-tests-func
kata-ctl: remove get_kata_version_by_url function
2023-01-09 18:18:21 +08:00
Bin Liu
03de5f41b2 kata-ctl: remove get_kata_version_by_url function
In `src/tools/kata-ctl/src/check.rs`, there is a function
`get_kata_version_by_url` in the tests mod,
indeed we can use the `get_kata_all_releases_by_url` in the main mod
to replace it.

Fixes: #5981

Signed-off-by: Bin Liu <bin@hyper.sh>
2023-01-09 15:32:16 +08:00
Fupan Li
2b34f0a54f
Merge pull request #5992 from liubin/fix/5987-kata-ctl-s390x-build-error
kata-ctl: fix build error on s390x
2023-01-09 15:28:37 +08:00
Bin Liu
1bae41a4d4
Merge pull request #5996 from dcantah/vfw-initial
virtcontainers: Introduce hypervisor_darwin
2023-01-09 11:37:02 +08:00
Jianyong Wu
464d4c94de runtime-rs: process single_container
Process single_container like pod_sandbox when create container but like
pod_container when get the size info of memory/cpu from oci/spec.

Fixes: #6006
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-01-09 10:29:01 +08:00
Jianyong Wu
5f9c892e48 kata-types: add single_container support
For now, only pod_sandbox and pod_container are supported. It doesn't cover
the case that container started by ctr which is a single_container defined
in kata 2.0. port the single_container kata type from kata 2.0 to kata 3.0.

Fixes: #6006
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2023-01-09 10:29:01 +08:00
Samuel Ortiz
fa9ae9362c virtcontainers: Add a Virtualization.framework skeleton
Fixes: #6004

A Virtualization.framework based Hypervisor implementation.
This is just stubs for now to eventually get this building.

Signed-off-by: Samuel Ortiz <s.ortiz@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-08 07:40:21 -08:00
Eric Ernst
d48b22bb13 virtcontainers: fs_share: add Darwin skeleton
Fixes: #6002

As a first pass for testing, let's add a skeleton for filesystem
sharing support on Darwin..

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-07 19:56:47 -08:00
Bin Liu
2c10b37172
Merge pull request #5991 from dcantah/darwin-sigs
runtime: Define Darwin handled signals list
2023-01-07 11:19:48 +08:00
Bin Liu
bc8a6423e0
Merge pull request #5986 from dcantah/nydus-nonetns
nydus: net-ns handling needs to be only executed on Linux hosts
2023-01-07 11:19:07 +08:00
Bo Chen
8265aad380
Merge pull request #6001 from fidencio/topic/add-network-hotplug-support-for-clh
clh: Ensure it works with Docker / Moby
2023-01-06 13:06:57 -08:00
Eric Ernst
fafc7a8b1a virtcontainers: tests: Ensure Linux specific tests are just run on Linux
Fixes: #5993

Several tests utilize linux'isms like Mounts, bindmounts, vsock etc.

Let's ensure that these are still tested on Linux, but that we also skip
these tests when on other operating systems (Darwin). This commit just
moves tests; there shouldn't be any functional test changes. While the
tests still won't be runnable on Darwin/other hosts yet, this is a necessary
step forward.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-06 11:09:11 -08:00
Fabiano Fidêncio
efa4fc0b25 clh: Add hotplug support for network devices
This is needed in order to have Moby / Docker working properly with
Cloud Hypervisor, as Moby / Docker relies on hotplugging a network
device to the VM as a preStartHook.

Fixes: #5997

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-06 18:59:47 +01:00
Fabiano Fidêncio
1074d2c1d3 clh: Make vmAddNetPutRequest capable of doing hotplugs
THe only bit needed for having the vmAddNetPutRequest() capable of
dealing with hotplugs, instead of only coldplugs, is making sure it
doesn't error out in case a `200` response is returned.

The 200 response means:
"""
The new device was successfully added to the VM instance.
"""

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-06 18:55:55 +01:00