Commit Graph

10414 Commits

Author SHA1 Message Date
Fabiano Fidêncio
f23b087145
Merge pull request #5977 from stevenhorsman/foreign-CC
CC | agent: unset `CC` for cross-build
2023-01-04 18:36:48 +01:00
James Tumber
f4ececc8ac agent: unset CC for cross-build
When `HOST_ARCH` != `ARCH` unset `CC`

Specifying a foreign CC is incompatible with building libgit2. Thus after the RUSTFLAGS linker
has been set we can safely unset CC to avoid passing this value through the build.

Fixes: #5890

Signed-off-by: James Tumber <james.tumber@ibm.com>
Cherry-picked: 087515a
2023-01-04 15:17:25 +00:00
Fabiano Fidêncio
3db9100a5c
Merge pull request #5651 from Alex-Carter01/online-sev-kbc
osbuilder: Switch to online_sev_kbc
2023-01-04 14:41:59 +01:00
Steve Horsman
de999429ce
Merge pull request #5927 from dubek/sev-es-guest
CCv0: runtime: Support launching SEV-ES guests
2023-01-04 09:37:27 +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
Fabiano Fidêncio
715fd0c933
Merge pull request #5969 from fidencio/topic/bump-image-rs
CC | agent: Update image-rs to bring stream pulling support
2023-01-03 22:09:51 +01:00
Fabiano Fidêncio
2a975c6546
Merge pull request #5939 from stevenhorsman/sev-initrd-suffix
CC | config: Add sev suffix to initrd
2023-01-03 21:37:33 +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
Fabiano Fidêncio
f1d6e64adf agent: Update image-rs to bring stream pulling support
Image layers stream pulling support has been merged into image-rs, and
we're now pulling an image-rs version that contains the merged code.

See: https://github.com/confidential-containers/image-rs/pull/96

Fixes: #5968

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 19:56:00 +01:00
Fabiano Fidêncio
474e37c286 runk: Fix needless_borrow warning
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 19:56:00 +01:00
Fabiano Fidêncio
c5be78a03d agent: Fix CCv0 specific unnecessary_lazy_evaluations
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_lazy_evaluations.

Let's fix them all here.

For more info about the warnings, please, take a look at:

https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 19:56:00 +01:00
Fabiano Fidêncio
60a8a5bf4a agent: Fix CCv0 specific "match-like-matches-macro" warning
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to "match-like-matches-macro".

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 19:56:00 +01:00
Fabiano Fidêncio
eaf72daa80 agent: Fix CCv0 specific needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 19:56:00 +01:00
Fabiano Fidêncio
853a3e0fa0 runtime-rs: Fix clippy::bool-to-int-with-if warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to boolean to int conversion using if.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#bool_to_int_with_if

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 19:56:00 +01:00
Fabiano Fidêncio
f5549de9cf runtime-rs: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 19:56:00 +01:00
Fabiano Fidêncio
4d05ab8022 runtime-rs: Allow clippy:box_default warnings
As the rust toolchain version bump to its 1.66.0 release raised a
warning about using Box::default() instead of specifying a type.

For now that's something we don't need to change, so let's ignore such
warning in this very specific case.

See:
https://rust-lang.github.io/rust-clippy/master/index.html#box_default

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 17:15:46 +01:00
Fabiano Fidêncio
38c43f4e32 runtime-rs: Fix unnecessary_cast warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
 raised due to unnecessary_cast.

 Let's fix them all here.

 For more info about the warnings, please, take a look at:
 https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 16:37:24 +01:00
Fabiano Fidêncio
bdb94fa35b dragonball: Allow question_mark warning in allocate_device_resources()
As the rust toolchain version bump to its 1.66.0 release raised a
warning about the code being able to be refactored to use `?`.

For now that's something we don't need to change, so let's ignore such
warning in this very specific case.

See:
https://rust-lang.github.io/rust-clippy/master/index.html#question_mark

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 16:37:24 +01:00
Fabiano Fidêncio
c7eb516bc0 dragonball: Fix unnecessary_cast warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 16:37:24 +01:00
Fabiano Fidêncio
1085fac5c2 agent: Allow clippy::question_mark warning in Namespace{}
As the rust toolchain version bump to its 1.66.0 release raised a
warning about the code being able to be refactored to use `?`.

For now that's something we don't need to change, so let's ignore such
warning in this very specific case.

See:
https://rust-lang.github.io/rust-clippy/master/index.html#question_mark

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:34:02 +01:00
Fabiano Fidêncio
c3c9e1b4a3 agent: Fix explicit_auto_deref warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to explicit_auto_deref.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:58 +01:00
Fabiano Fidêncio
20be612cd1 agent: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:53 +01:00
Fabiano Fidêncio
083e3f26ed rustjail: Fix unnecessary_cast warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:48 +01:00
Fabiano Fidêncio
1f391ef511 rustjail: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:40 +01:00
Fabiano Fidêncio
bc71ca0d73 kata-types: Fix unnecessary_cast warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:33 +01:00
Fabiano Fidêncio
ac4c0ff9d6 kata-types: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:29 +01:00
Fabiano Fidêncio
036e82a164 safe-path: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:23 +01:00
Fabiano Fidêncio
4b4ecd0cba kata-sys-util: Fix "match-like-matches-macro" warning
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to "match-like-matches-macro".

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:13 +01:00
Fabiano Fidêncio
c16c1bde86 kata-sys-util: Fix unnecessary_cast warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:08 +01:00
Fabiano Fidêncio
021201005d kata-sys-util: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:33:01 +01:00
Fabiano Fidêncio
716b22a458 logging: Allow clippy::type-complexity warning
As the rust toolchain version bump to its 1.66.0 release raised a
warning about the type complexity used for the closure, and that's
something we don't want to change, let's ignore such warning in this
very specific case.

See:
https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:32:52 +01:00
Fabiano Fidêncio
738d2d9736 logging: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:32:47 +01:00
Fabiano Fidêncio
869b9d15a8 protocols: Fix unnecessary_cast warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to unnecessary_cast.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:32:30 +01:00
Fabiano Fidêncio
eda857d898 protocols: Fix needless_borrow warnings
As we bumped the rust toolchain to 1.66.0, some new warnings have been
raised due to needless_borrow.

Let's fix them all here.

For more info about the warnings, please, take a look at:
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:31:12 +01:00
Fabiano Fidêncio
7c79806ff0 versions: Update the rust toolchain to 1.66.0
We're doing the bump on main, as we'll need this as part of the CCv0
branch due to the dependencies we have there.

Link to the 1.66.0 release:
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1660-2022-12-15

Fixes: #5966
Backport: #5967

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2023-01-02 15:30:59 +01:00
Dov Murik
adec86cc40 runtime: Support launching SEV-ES guests
The `sev_guest_policy` configuration field distinguishes between SEV and
SEV-ES guests (according to standard AMD SEV policy values).

Modify the kata runtime to detect SEV-ES guests and calculate calculate
the expected launch digest taking into account the number of VCPUs and
their CPU signature (model/family/stepping).

Fixes: #5471

Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
2022-12-21 21:29:45 +00:00
stevenhorsman
ca2cb3faff config: Add sev suffix to initrd
- Add new sev initrd name and path to point to the correct name of
the file built

Fixes: #5938
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-12-21 16:25:04 +00:00
Steve Horsman
769f91de8b
Merge pull request #5933 from Megan-Wright/CCv0
CC: Merge main into CCv0 branch
2022-12-21 13:35:57 +00:00
Steve Horsman
70b617db98
Merge pull request #5937 from stevenhorsman/remote-hypervisor-selinux
runtime: Update the remote hypervisor config
2022-12-21 10:17:55 +00:00
stevenhorsman
3ef2fd1784 runtime: Update the remote hypervisor config
Add the SELinux setting to ensure it is passed through to the remote
hypervisor

Fixes: #5936

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-12-20 13:11:54 +00: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
2e54c8e887
Merge pull request #5921 from fidencio/3.1.0-alpha1-branch-bump
# Kata Containers 3.1.0-alpha1
2022-12-19 15:45:53 +01:00
Steve Horsman
60beb49698
Merge pull request #5929 from stevenhorsman/fix-version-comment
version: Fix formatting
2022-12-19 13:33:27 +00:00
stevenhorsman
c66a26ac09 version: Fix formatting
Add space before start of comment

Fixes: #5928
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-12-19 10:04:58 +00:00
Bin Liu
6039516802
Merge pull request #5925 from xinydev/fix-docs
docs: Remove duplicate sentences
2022-12-19 17:12:15 +08:00
Peng Tao
473f5ff7da
Merge pull request #5861 from mflagey/Docs_Change_build_virtiofsd_in_developer_guide_#5860
docs: Update virtiofsd build script in the developer guide
2022-12-19 17:02:35 +08:00
Bin Liu
0cf443a612
Merge pull request #5915 from openanolis/legacy_device
dragonball: refactor legacy device initialization
2022-12-19 13:31:45 +08: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
Xin Yang
74fa10a235 docs: remove duplicate sentences
remove duplicate sentences in spdk docs
Fixes: #5926

Signed-off-by: Xin Yang <xinydev@gmail.com>
2022-12-17 11:26:36 +00:00
Bin Liu
e4645642d0
Merge pull request #5877 from openanolis/fix_start_bundle
runtime-rs: enable start container from bundle
2022-12-17 08:10:08 +08:00