mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
2f8edc182ebf076b0fedccc182863ec7fe5063ec
2702 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
41382879d3 |
seccomp: add arch_prctl syscall for amx
When enabling amx feature, we should call arch_prctl to request permission to use tile data for guest. The permission should be requested before the first vcpu is created, so we need to call arch_prctl in vmm thread. This patch adds the arch_prctl syscall for vmm_thread_rules. Fixes: #7516 Signed-off-by: Songqian Li <sionli@tencent.com> |
||
|
|
6a86c157af |
misc: clippy: add needless_pass_by_value (partially)
This helps to uncover expensive and needless clones in the code base. For example, I prevented extensive clones in the snapshot path where (nested) BTreeMap's have been cloned over and over again. Further, the lint helps devs to much better reason about the ownership of parameters. All of these changes have been done manually with the necessary caution. A few structs that are cheap to clone are now `copy` so that this lint won't trigger for them. I didn't enable the lint so far as it is a massive rabbit hole and needs much more fixes. Nevertheless, it is very useful. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
0a07c96d17 |
misc: clippy: add if_not_else
This removes cognitive load when reading if statements. All changes were applied by clippy via `--fix`. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
a0b72dce22 |
misc: clippy: add redundant_else
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
d2b19bb969 |
misc: clippy: add map_unwrap_or
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
8c50450002 |
vmm: don't needlessly clone strings
On-behalf-of: SAP julian.stecklina@sap.com Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de> |
||
|
|
7443a9f69e |
misc: fix typo and wording
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
28b54df01d |
vmm: cleanup: replace map_err misuse with inspect_err
This is continuing the work from [0]. Some places in CHV
"misuse" Result::map_err for side-effects. inspect_err is
a better suited alternative for exactly that use-case.
Unfortunately, there is no clippy lint for this yet.
[0]
|
||
|
|
4e93f85ab1 |
build: Bump the non-rust-vmm group across 2 directories with 38 updates
Bumps the non-rust-vmm group with 28 updates in the / directory: | Package | From | To | | --- | --- | --- | | [zbus](https://github.com/z-galaxy/zbus) | `5.11.0` | `5.12.0` | | [serde_with](https://github.com/jonasbb/serde_with) | `3.15.0` | `3.16.0` | | [bitflags](https://github.com/bitflags/bitflags) | `2.9.4` | `2.10.0` | | [cfg-if](https://github.com/rust-lang/cfg-if) | `1.0.3` | `1.0.4` | | [clap](https://github.com/clap-rs/clap) | `4.5.49` | `4.5.53` | | [zerocopy](https://github.com/google/zerocopy) | `0.8.27` | `0.8.30` | | [io-uring](https://github.com/tokio-rs/io-uring) | `0.7.10` | `0.7.11` | | [num_enum](https://github.com/illicitonion/num_enum) | `0.7.4` | `0.7.5` | | [getrandom](https://github.com/rust-random/getrandom) | `0.3.3` | `0.3.4` | | [landlock](https://github.com/landlock-lsm/rust-landlock) | `0.4.3` | `0.4.4` | | [aho-corasick](https://github.com/BurntSushi/aho-corasick) | `1.1.3` | `1.1.4` | | [anstyle-query](https://github.com/rust-cli/anstyle) | `1.1.4` | `1.1.5` | | [anstyle-wincon](https://github.com/rust-cli/anstyle) | `3.0.10` | `3.0.11` | | [cc](https://github.com/rust-lang/cc-rs) | `1.2.41` | `1.2.47` | | [hashbrown](https://github.com/rust-lang/hashbrown) | `0.16.0` | `0.16.1` | | [indexmap](https://github.com/indexmap-rs/indexmap) | `2.11.4` | `2.12.1` | | [is_terminal_polyfill](https://github.com/polyfill-rs/is_terminal_polyfill) | `1.70.1` | `1.70.2` | | [jiff](https://github.com/BurntSushi/jiff) | `0.2.15` | `0.2.16` | | [libz-sys](https://github.com/rust-lang/libz-sys) | `1.1.22` | `1.1.23` | | [once_cell_polyfill](https://github.com/polyfill-rs/once_cell_polyfill) | `1.70.1` | `1.70.2` | | [openssl-src](https://github.com/alexcrichton/openssl-src-rs) | `300.5.3+3.5.4` | `300.5.4+3.5.4` | | [openssl-sys](https://github.com/rust-openssl/rust-openssl) | `0.9.109` | `0.9.111` | | [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.101` | `1.0.103` | | [quote](https://github.com/dtolnay/quote) | `1.0.41` | `1.0.42` | | [signal-hook-registry](https://github.com/vorner/signal-hook) | `1.4.6` | `1.4.7` | | [syn](https://github.com/dtolnay/syn) | `2.0.106` | `2.0.111` | | [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.19` | `1.0.22` | | [zvariant](https://github.com/dbus2/zbus) | `5.7.0` | `5.8.0` | Bumps the non-rust-vmm group with 20 updates in the /fuzz directory: | Package | From | To | | --- | --- | --- | | [serde_with](https://github.com/jonasbb/serde_with) | `3.15.0` | `3.16.0` | | [bitflags](https://github.com/bitflags/bitflags) | `2.9.4` | `2.10.0` | | [cfg-if](https://github.com/rust-lang/cfg-if) | `1.0.3` | `1.0.4` | | [clap](https://github.com/clap-rs/clap) | `4.5.49` | `4.5.53` | | [zerocopy](https://github.com/google/zerocopy) | `0.8.27` | `0.8.30` | | [num_enum](https://github.com/illicitonion/num_enum) | `0.7.4` | `0.7.5` | | [landlock](https://github.com/landlock-lsm/rust-landlock) | `0.4.3` | `0.4.4` | | [anstyle-query](https://github.com/rust-cli/anstyle) | `1.1.4` | `1.1.5` | | [anstyle-wincon](https://github.com/rust-cli/anstyle) | `3.0.10` | `3.0.11` | | [cc](https://github.com/rust-lang/cc-rs) | `1.2.41` | `1.2.47` | | [hashbrown](https://github.com/rust-lang/hashbrown) | `0.16.0` | `0.16.1` | | [indexmap](https://github.com/indexmap-rs/indexmap) | `2.11.4` | `2.12.1` | | [is_terminal_polyfill](https://github.com/polyfill-rs/is_terminal_polyfill) | `1.70.1` | `1.70.2` | | [once_cell_polyfill](https://github.com/polyfill-rs/once_cell_polyfill) | `1.70.1` | `1.70.2` | | [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.101` | `1.0.103` | | [quote](https://github.com/dtolnay/quote) | `1.0.41` | `1.0.42` | | [signal-hook-registry](https://github.com/vorner/signal-hook) | `1.4.6` | `1.4.7` | | [syn](https://github.com/dtolnay/syn) | `2.0.106` | `2.0.111` | | [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.19` | `1.0.22` | | [windows-sys](https://github.com/microsoft/windows-rs) | `0.60.2` | `0.61.2` | Updates `zbus` from 5.11.0 to 5.12.0 - [Release notes](https://github.com/z-galaxy/zbus/releases) - [Commits](https://github.com/z-galaxy/zbus/compare/zbus-5.11.0...zbus-5.12.0) Updates `serde_with` from 3.15.0 to 3.16.0 - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v3.15.0...v3.16.0) Updates `bitflags` from 2.9.4 to 2.10.0 - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/2.9.4...2.10.0) Updates `cfg-if` from 1.0.3 to 1.0.4 - [Release notes](https://github.com/rust-lang/cfg-if/releases) - [Changelog](https://github.com/rust-lang/cfg-if/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cfg-if/compare/v1.0.3...v1.0.4) Updates `clap` from 4.5.49 to 4.5.53 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.49...clap_complete-v4.5.53) Updates `zerocopy` from 0.8.27 to 0.8.30 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/compare/v0.8.27...v0.8.30) Updates `io-uring` from 0.7.10 to 0.7.11 - [Commits](https://github.com/tokio-rs/io-uring/commits/v0.7.11) Updates `num_enum` from 0.7.4 to 0.7.5 - [Commits](https://github.com/illicitonion/num_enum/compare/0.7.4...0.7.5) Updates `getrandom` from 0.3.3 to 0.3.4 - [Release notes](https://github.com/rust-random/getrandom/releases) - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-random/getrandom/compare/v0.3.3...v0.3.4) Updates `landlock` from 0.4.3 to 0.4.4 - [Release notes](https://github.com/landlock-lsm/rust-landlock/releases) - [Changelog](https://github.com/landlock-lsm/rust-landlock/blob/main/CHANGELOG.md) - [Commits](https://github.com/landlock-lsm/rust-landlock/compare/v0.4.3...v0.4.4) Updates `aho-corasick` from 1.1.3 to 1.1.4 - [Commits](https://github.com/BurntSushi/aho-corasick/compare/1.1.3...1.1.4) Updates `anstyle-query` from 1.1.4 to 1.1.5 - [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-query-v1.1.4...anstyle-query-v1.1.5) Updates `anstyle-wincon` from 3.0.10 to 3.0.11 - [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-wincon-v3.0.10...anstyle-wincon-v3.0.11) Updates `cc` from 1.2.41 to 1.2.47 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.41...cc-v1.2.47) Updates `clap_builder` from 4.5.49 to 4.5.53 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.5.49...v4.5.53) Updates `find-msvc-tools` from 0.1.4 to 0.1.5 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/find-msvc-tools-v0.1.4...find-msvc-tools-v0.1.5) Updates `hashbrown` from 0.16.0 to 0.16.1 - [Release notes](https://github.com/rust-lang/hashbrown/releases) - [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/hashbrown/compare/v0.16.0...v0.16.1) Updates `indexmap` from 2.11.4 to 2.12.1 - [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md) - [Commits](https://github.com/indexmap-rs/indexmap/compare/2.11.4...2.12.1) Updates `is_terminal_polyfill` from 1.70.1 to 1.70.2 - [Changelog](https://github.com/polyfill-rs/is_terminal_polyfill/blob/main-v1.70/CHANGELOG.md) - [Commits](https://github.com/polyfill-rs/is_terminal_polyfill/compare/v1.70.1...v1.70.2) Updates `jiff` from 0.2.15 to 0.2.16 - [Release notes](https://github.com/BurntSushi/jiff/releases) - [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.15...jiff-static-0.2.16) Updates `jiff-static` from 0.2.15 to 0.2.16 - [Release notes](https://github.com/BurntSushi/jiff/releases) - [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md) - [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.15...jiff-static-0.2.16) Updates `libz-sys` from 1.1.22 to 1.1.23 - [Release notes](https://github.com/rust-lang/libz-sys/releases) - [Commits](https://github.com/rust-lang/libz-sys/compare/1.1.22...1.1.23) Updates `num_enum_derive` from 0.7.4 to 0.7.5 - [Commits](https://github.com/illicitonion/num_enum/compare/0.7.4...0.7.5) Updates `once_cell_polyfill` from 1.70.1 to 1.70.2 - [Changelog](https://github.com/polyfill-rs/once_cell_polyfill/blob/v1.70.2/CHANGELOG.md) - [Commits](https://github.com/polyfill-rs/once_cell_polyfill/compare/v1.70.1...v1.70.2) Updates `openssl-src` from 300.5.3+3.5.4 to 300.5.4+3.5.4 - [Release notes](https://github.com/alexcrichton/openssl-src-rs/releases) - [Commits](https://github.com/alexcrichton/openssl-src-rs/commits) Updates `openssl-sys` from 0.9.109 to 0.9.111 - [Release notes](https://github.com/rust-openssl/rust-openssl/releases) - [Commits](https://github.com/rust-openssl/rust-openssl/compare/openssl-sys-v0.9.109...openssl-sys-v0.9.111) Updates `proc-macro2` from 1.0.101 to 1.0.103 - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.101...1.0.103) Updates `quote` from 1.0.41 to 1.0.42 - [Release notes](https://github.com/dtolnay/quote/releases) - [Commits](https://github.com/dtolnay/quote/compare/1.0.41...1.0.42) Updates `serde_with_macros` from 3.15.0 to 3.16.0 - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v3.15.0...v3.16.0) Updates `signal-hook-registry` from 1.4.6 to 1.4.7 - [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md) - [Commits](https://github.com/vorner/signal-hook/compare/registry-v1.4.6...registry-v1.4.7) Updates `syn` from 2.0.106 to 2.0.111 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.106...2.0.111) Updates `unicode-ident` from 1.0.19 to 1.0.22 - [Release notes](https://github.com/dtolnay/unicode-ident/releases) - [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.19...1.0.22) Updates `zbus_macros` from 5.11.0 to 5.12.0 - [Release notes](https://github.com/z-galaxy/zbus/releases) - [Commits](https://github.com/z-galaxy/zbus/compare/zbus-5.11.0...zbus-5.12.0) Updates `zerocopy-derive` from 0.8.27 to 0.8.30 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/compare/v0.8.27...v0.8.30) Updates `zvariant` from 5.7.0 to 5.8.0 - [Release notes](https://github.com/dbus2/zbus/releases) - [Commits](https://github.com/dbus2/zbus/compare/zvariant-5.7.0...zvariant-5.8.0) Updates `zvariant_derive` from 5.7.0 to 5.8.0 - [Release notes](https://github.com/dbus2/zbus/releases) - [Commits](https://github.com/dbus2/zbus/compare/zbus-5.7.0...zbus-5.8.0) Updates `serde_with` from 3.15.0 to 3.16.0 - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v3.15.0...v3.16.0) Updates `bitflags` from 2.9.4 to 2.10.0 - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/2.9.4...2.10.0) Updates `cfg-if` from 1.0.3 to 1.0.4 - [Release notes](https://github.com/rust-lang/cfg-if/releases) - [Changelog](https://github.com/rust-lang/cfg-if/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cfg-if/compare/v1.0.3...v1.0.4) Updates `clap` from 4.5.49 to 4.5.53 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.49...clap_complete-v4.5.53) Updates `zerocopy` from 0.8.27 to 0.8.30 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/compare/v0.8.27...v0.8.30) Updates `bitfield-struct` from 0.11.0 to 0.12.1 - [Release notes](https://github.com/wrenger/bitfield-struct-rs/releases) - [Commits](https://github.com/wrenger/bitfield-struct-rs/compare/0.11.0...0.12.1) Updates `num_enum` from 0.7.4 to 0.7.5 - [Commits](https://github.com/illicitonion/num_enum/compare/0.7.4...0.7.5) Updates `landlock` from 0.4.3 to 0.4.4 - [Release notes](https://github.com/landlock-lsm/rust-landlock/releases) - [Changelog](https://github.com/landlock-lsm/rust-landlock/blob/main/CHANGELOG.md) - [Commits](https://github.com/landlock-lsm/rust-landlock/compare/v0.4.3...v0.4.4) Updates `anstyle-query` from 1.1.4 to 1.1.5 - [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-query-v1.1.4...anstyle-query-v1.1.5) Updates `anstyle-wincon` from 3.0.10 to 3.0.11 - [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-wincon-v3.0.10...anstyle-wincon-v3.0.11) Updates `cc` from 1.2.41 to 1.2.47 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.41...cc-v1.2.47) Updates `clap_builder` from 4.5.49 to 4.5.53 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/v4.5.49...v4.5.53) Updates `find-msvc-tools` from 0.1.4 to 0.1.5 - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cc-rs/compare/find-msvc-tools-v0.1.4...find-msvc-tools-v0.1.5) Updates `hashbrown` from 0.16.0 to 0.16.1 - [Release notes](https://github.com/rust-lang/hashbrown/releases) - [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/hashbrown/compare/v0.16.0...v0.16.1) Updates `indexmap` from 2.11.4 to 2.12.1 - [Changelog](https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md) - [Commits](https://github.com/indexmap-rs/indexmap/compare/2.11.4...2.12.1) Updates `is_terminal_polyfill` from 1.70.1 to 1.70.2 - [Changelog](https://github.com/polyfill-rs/is_terminal_polyfill/blob/main-v1.70/CHANGELOG.md) - [Commits](https://github.com/polyfill-rs/is_terminal_polyfill/compare/v1.70.1...v1.70.2) Updates `num_enum_derive` from 0.7.4 to 0.7.5 - [Commits](https://github.com/illicitonion/num_enum/compare/0.7.4...0.7.5) Updates `once_cell_polyfill` from 1.70.1 to 1.70.2 - [Changelog](https://github.com/polyfill-rs/once_cell_polyfill/blob/v1.70.2/CHANGELOG.md) - [Commits](https://github.com/polyfill-rs/once_cell_polyfill/compare/v1.70.1...v1.70.2) Updates `proc-macro2` from 1.0.101 to 1.0.103 - [Release notes](https://github.com/dtolnay/proc-macro2/releases) - [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.101...1.0.103) Updates `quote` from 1.0.41 to 1.0.42 - [Release notes](https://github.com/dtolnay/quote/releases) - [Commits](https://github.com/dtolnay/quote/compare/1.0.41...1.0.42) Updates `serde_with_macros` from 3.15.0 to 3.16.0 - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v3.15.0...v3.16.0) Updates `signal-hook-registry` from 1.4.6 to 1.4.7 - [Changelog](https://github.com/vorner/signal-hook/blob/master/CHANGELOG.md) - [Commits](https://github.com/vorner/signal-hook/compare/registry-v1.4.6...registry-v1.4.7) Updates `syn` from 2.0.106 to 2.0.111 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.106...2.0.111) Updates `unicode-ident` from 1.0.19 to 1.0.22 - [Release notes](https://github.com/dtolnay/unicode-ident/releases) - [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.19...1.0.22) Updates `windows-sys` from 0.60.2 to 0.61.2 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits) Updates `zerocopy-derive` from 0.8.27 to 0.8.30 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/compare/v0.8.27...v0.8.30) --- updated-dependencies: - dependency-name: zbus dependency-version: 5.12.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: serde_with dependency-version: 3.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: bitflags dependency-version: 2.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: cfg-if dependency-version: 1.0.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: clap dependency-version: 4.5.53 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: zerocopy dependency-version: 0.8.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: io-uring dependency-version: 0.7.11 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: num_enum dependency-version: 0.7.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: getrandom dependency-version: 0.3.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: landlock dependency-version: 0.4.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: aho-corasick dependency-version: 1.1.4 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: anstyle-query dependency-version: 1.1.5 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: anstyle-wincon dependency-version: 3.0.11 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: cc dependency-version: 1.2.47 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: clap_builder dependency-version: 4.5.53 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: find-msvc-tools dependency-version: 0.1.5 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: hashbrown dependency-version: 0.16.1 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: indexmap dependency-version: 2.12.1 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: is_terminal_polyfill dependency-version: 1.70.2 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: jiff dependency-version: 0.2.16 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: jiff-static dependency-version: 0.2.16 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: libz-sys dependency-version: 1.1.23 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: num_enum_derive dependency-version: 0.7.5 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: once_cell_polyfill dependency-version: 1.70.2 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: openssl-src dependency-version: 300.5.4+3.5.4 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: openssl-sys dependency-version: 0.9.111 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: proc-macro2 dependency-version: 1.0.103 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: quote dependency-version: 1.0.42 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: serde_with_macros dependency-version: 3.16.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: signal-hook-registry dependency-version: 1.4.7 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: syn dependency-version: 2.0.111 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: unicode-ident dependency-version: 1.0.22 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: zbus_macros dependency-version: 5.12.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: zerocopy-derive dependency-version: 0.8.30 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: zvariant dependency-version: 5.8.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: zvariant_derive dependency-version: 5.8.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: serde_with dependency-version: 3.16.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: bitflags dependency-version: 2.10.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: cfg-if dependency-version: 1.0.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: clap dependency-version: 4.5.53 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: zerocopy dependency-version: 0.8.30 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: bitfield-struct dependency-version: 0.12.1 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: num_enum dependency-version: 0.7.5 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: landlock dependency-version: 0.4.4 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: anstyle-query dependency-version: 1.1.5 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: anstyle-wincon dependency-version: 3.0.11 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: cc dependency-version: 1.2.47 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: clap_builder dependency-version: 4.5.53 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: find-msvc-tools dependency-version: 0.1.5 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: hashbrown dependency-version: 0.16.1 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: indexmap dependency-version: 2.12.1 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: is_terminal_polyfill dependency-version: 1.70.2 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: num_enum_derive dependency-version: 0.7.5 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: once_cell_polyfill dependency-version: 1.70.2 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: proc-macro2 dependency-version: 1.0.103 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: quote dependency-version: 1.0.42 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: serde_with_macros dependency-version: 3.16.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: signal-hook-registry dependency-version: 1.4.7 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: syn dependency-version: 2.0.111 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: unicode-ident dependency-version: 1.0.22 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm - dependency-name: windows-sys dependency-version: 0.61.2 dependency-type: indirect update-type: version-update:semver-minor dependency-group: non-rust-vmm - dependency-name: zerocopy-derive dependency-version: 0.8.30 dependency-type: indirect update-type: version-update:semver-patch dependency-group: non-rust-vmm ... Signed-off-by: dependabot[bot] <support@github.com> |
||
|
|
67fc9d990e |
misc: vmm: drop extern crate, use modern rust
This commit is part of a series of similar commits. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
969a3b57a3 |
misc: tdx: make tdx_init_memory_region() unsafe
It takes a pointer to a userspace address that it accesses, so it should be marked unsafe. This was missed earlier. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> |
||
|
|
8be28f8438 |
misc: Work around vfio_dma_map being unsound
This API passes a u64 to a kernel API that treats the u64 as a userspace address. Therefore, it should be marked unsafe, but it currently is not [1]. Wrap the call in an unsafe block to document that invariants must be upheld to avoid undefined behavior. This causes a compiler warning, so suppress the warning with #[allow(unused_unsafe)]. [1]: https://github.com/rust-vmm/vfio/issues/100 Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> |
||
|
|
199d2d05d8 |
hypervisor: tdx: do not use u64 to represent pointers
Also drop support for building the TDX code for 32-bit targets. All CPUs with TDX support are 64-bit so supporting 32-bit targets is not needed. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> |
||
|
|
42522a88c0 |
misc: do not use u64 to represent host pointers
To ensure that struct sizes are the same on 32-bit and 64-bit, various kernel APIs use __u64 (Rust u64) to represent userspace pointers. Userspace is expected to cast pointers to __u64 before passing them to the kernel, and cast kernel-provided __u64 to a pointer before using them. However, various safe APIs in Cloud Hypervisor took caller-provided u64 values and passed them to syscalls that interpret them as userspace addresses. Therefore, passing bad u64 values would cause memory disclosure or corruption. Fix the bug by using usize and pointer types as appropriate. To make soundness of the code easier to reason about, the PCI code gains a new MmapRegion abstraction that ensures the validity of pointers. The rest of the code already has an MmapRegion abstraction it can use. To avoid having to reason about whether something is keeping the MmapRegion alive, reference counting is added. MmapRegion cannot hold references to other objects, so the reference counting cannot introduce cycles. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> |
||
|
|
fdc19ad85e |
misc: Mark memory region APIs as unsafe
To ensure that struct sizes are the same on 32-bit and 64-bit, various kernel APIs use __u64 (Rust u64) to represent userspace pointers. Userspace is expected to cast pointers to __u64 before passing them to the kernel, and cast kernel-provided __u64 to a pointer before using them. However, various safe APIs in Cloud Hypervisor took caller-provided u64 values and passed them to syscalls that treat them as userspace addresses. Therefore, passing bad u64 values would cause memory disclosure or corruption. The memory region APIs are one example of this, so mark them as unsafe. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> |
||
|
|
00f0b9e42c |
vmm: Fix clippy lints on RISC-V
These caused CI failures in #7129. No functional change. Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com> |
||
|
|
95b8c6afdd |
seccomp: allow sendto for vfio_user devices
as of rust 1.90, writes to unix sockets use the sendto syscall. This affects the vcpu threads when vfio_user devices are accessed. Signed-off-by: Stefan Nürnberger <stefan.nuernberger@cyberus-technology.de> |
||
|
|
f02745a7ed |
vmm: unrelated small code improvements
Unfortunately, there is no lint for that. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
fed010fcd1 |
misc: clippy: add manual_string_new
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
b4c62bf159 |
misc: clippy: add semicolon_if_nothing_returned
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
ea4f07d3bf |
misc: clippy: add uninlined_format_args
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
7cb73e9e56 |
misc: clippy: add unnecessary_semicolon
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
7364fbdc8e |
tests: move VM test into a test module
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
35b91f76af |
tests: prevent broken terminal after running cargo test -p vmm
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
d1680b9ff9 |
tests: streamline module names to unit_tests
This better aligns with the rest of the code and makes it clearer that these tests can run "as is" in a normal hosted environments without the special test environment. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
935332bc42 |
misc: unrelated misc code improvements
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
e4fd066d82 |
misc: improve developer experience of cargo clippy
A major improvement to the developer experience of clippy in Cloud Hypervisor. 1. Make `cargo clippy` just work with the same lints we use in CI 2. Simplify adding new lints Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
a7fa3a0c86 |
vm-migration: better naming + unittests
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
b6c266c880 |
vmm: avoid creating large temporary vector during migration
... by just passing the iterator along. For large VMs this bitmap is gigantic. A 12TB VM has 384MB of dirty bitmap. With all these optimizations from the previous commits in place, we see quite the improvement when it comes to scanning the dirty bitmap. For a bitmap with 1% bits (randomly) set, dirty_log() takes: Original code: 2166ms (100.0%) New code: 382ms ( 17.6%) on my system. The sparser the dirty bitmap the faster. Scanning an empty bitmap is 100x faster. For a 5% populated bitmap we are still 3x faster. If someone wants to play with this, there is a benchmark harness here: https://github.com/blitz/chv-bitmap-bench On-behalf-of: SAP julian.stecklina@sap.com Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de> |
||
|
|
e023efce3d |
vmm: cpu: Retry signalling the vCPU thread if it doesn't acknowledge
Resignal every 10ms the thread if it has not acknowledged the signal via setting the atomic when the vCPU thread was acknowledged. Further, avoid an infinite loop by generating an error if it takes more than 1000ms to interrupt the thread. The retry helps mitigate a race condition where the signal is received between checking the pause atomic and entering KVM_RUN ioctl when pausing. Hitting this race condition would leave the wait_untial_signal_acknowledged() method spinning indefinitely. The timeout error avoids the VMM process being blocked indefinitely. See: #7427 Signed-off-by: Rob Bradford <rbradford@rivosinc.com> |
||
|
|
bb7730e00f |
vmm: seccomp: Use rseq syscall constant
Formerly these syscall's had to be specified by number as the constants were missing in musl. Signed-off-by: Rob Bradford <rbradford@rivosinc.com> |
||
|
|
d59dfdf8b6 |
vmm: seccomp: allow http-server to use sendto
Fixes: https://github.com/cloud-hypervisor/cloud-hypervisor/issues/7449 Signed-off-by: Alyssa Ross <hi@alyssa.is> |
||
|
|
0395b10b29 |
openapi: add missing NetConfig offload parameters
Signed-off-by: Alyssa Ross <hi@alyssa.is> |
||
|
|
7536a95424 |
misc: cleanup &Arc<dyn T> -> &dyn T
Consuming `&Arc<T>` as argument is almost always an antipattern as it hides whether the callee is going to take over (shared) ownership (by .clone()) or not. Instead, it is better to consume `&dyn T` or `Arc<dyn T>` to be more explicit. This commit cleans up the code. The change is very mechanic and was very easy to implement across the code base. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
3e339439a4 |
arch: move GICv2M SPI base to leave room for legacy IRQs
Move the GICv2M MSI frame SPI base from 32 to 128 to avoid conflicts with platform device interrupts. While at it, rename the constants to make it explicit that they are associated with the GICv2m MSI Frame. Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com> |
||
|
|
cb5aaca809 |
hypervisor, vmm: Remove inner Mutex protecting VcpuFd
This was added in
|
||
|
|
d39b56544a |
vmm: fix CpuManager::resume(): gracefully wait for run vCPU loop ACK
Fix a race condition that happens in resume()-pause() cycles.
It is odd that for pause(), the CpuManager waited via `state.paused`
for the vCPU thread to ACK the state change but not for `resume()`.
In the `resume()` case, oddly CpuManager "owned" the state change
in `state.paused`. This commit changes this so that the vCPU ACKs
its state change itself in `state.paused` when it transitions from
pause->run. Further, `CpuManager::resume()` now gracefully waits for
the vCPU to be resumed.
More technical:
This change ensures proper synchronization and prevents situations
in that park() follows right after unpark(), causing deadlocks and
other weird behavior due to race conditions.
Calling resume() now takes slightly longer, very similar to pause().
This is, however, even for 254 vCPUs in the range of less than 10ms,
and ultimately we now have correct behaviour.
## Reproducer
Since [0] is merged, the underlying problem can be tested without this
commit by modifying the pause() API call to run `CpuManager::pause()`
and `CpuManager::resume()` in a loop a thousand times.
`ch-remote --api-socket ... pause`
```patch
diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs
index d7bba25cc..35557d58f 100644
--- a/vmm/src/vm.rs
+++ b/vmm/src/vm.rs
@@ -2687,6 +2687,10 @@ impl Pausable for Vm {
MigratableError::Pause(anyhow!("Error activating pending virtio devices: {:?}", e))
})?;
+ for _ in 0..1000 {
+ self.cpu_manager.lock().unwrap().pause()?;
+ self.cpu_manager.lock().unwrap().resume()?;
+ }
self.cpu_manager.lock().unwrap().pause()?;
self.device_manager.lock().unwrap().pause()?;
```
## Outlook
Decades of experience in VMM development showed us that using
many AtomicBools is a footgun. They are not synchronized with each
other at all. On the long term, we might want to refactor things to
have a single shared AtomicU64 with different bits having different
meanings.
[0] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7290
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
|
||
|
|
8481026b60 |
vmm: refactor poor naming
These bindings actually refer to atomic bool shared across all vCPUs to instruct single vCPUs with their next action. As there are already enough Arc<AtomicBool>, this helps while debugging things to see that different bindings refer to the same atomic bool. In other words: This naming really confused us while debugging. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
e6ddfe07c3 |
vmm: remove noop
The vCPU lifecycle is already complicated. Let's remove dead code (the impl is a no-op). Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
4290d4f20e |
build: Bump the non-rust-vmm group across 2 directories with 25 updates
Bumps the non-rust-vmm group with 20 updates in the / directory: | Package | From | To | | --- | --- | --- | | [igvm](https://github.com/microsoft/igvm) | ``9b67b6f`` | ``5d2b5a5`` | | [clap](https://github.com/clap-rs/clap) | `4.5.48` | `4.5.49` | | [libc](https://github.com/rust-lang/libc) | `0.2.176` | `0.2.177` | | [gdbstub](https://github.com/daniel5151/gdbstub) | `0.7.7` | `0.7.8` | | [cc](https://github.com/rust-lang/cc-rs) | `1.2.40` | `1.2.41` | | [clap_lex](https://github.com/clap-rs/clap) | `0.7.5` | `0.7.6` | | [env_filter](https://github.com/rust-cli/env_logger) | `0.1.3` | `0.1.4` | | [regex](https://github.com/rust-lang/regex) | `1.11.3` | `1.12.2` | | [regex-syntax](https://github.com/rust-lang/regex) | `0.8.6` | `0.8.8` | | [toml_datetime](https://github.com/toml-rs/toml) | `0.7.2` | `0.7.3` | | [toml_edit](https://github.com/toml-rs/toml) | `0.23.6` | `0.23.7` | | [windows-targets](https://github.com/microsoft/windows-rs) | `0.53.2` | `0.53.5` | | [windows_aarch64_gnullvm](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | | [windows_aarch64_msvc](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | | [windows_i686_gnu](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | | [windows_i686_gnullvm](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | | [windows_i686_msvc](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | | [windows_x86_64_gnu](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | | [windows_x86_64_gnullvm](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | | [windows_x86_64_msvc](https://github.com/microsoft/windows-rs) | `0.53.0` | `0.53.1` | Bumps the non-rust-vmm group with 7 updates in the /fuzz directory: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.48` | `4.5.49` | | [libc](https://github.com/rust-lang/libc) | `0.2.176` | `0.2.177` | | [gdbstub](https://github.com/daniel5151/gdbstub) | `0.7.7` | `0.7.8` | | [cc](https://github.com/rust-lang/cc-rs) | `1.2.40` | `1.2.41` | | [clap_lex](https://github.com/clap-rs/clap) | `0.7.5` | `0.7.6` | | [toml_datetime](https://github.com/toml-rs/toml) | `0.7.2` | `0.7.3` | | [toml_edit](https://github.com/toml-rs/toml) | `0.23.6` | `0.23.7` | Updates `igvm` from `9b67b6f` to `5d2b5a5` - [Release notes](https://github.com/microsoft/igvm/releases) - [Commits]( |
||
|
|
d10f6dd357 |
vmm: Enable RISC-V ACPI support
Add necessary definitions and RISC-V ACPI tables to enable ACPI feature. More specifically, this commit add MADT definitions for RISC-V AIA interrupt chips. Signed-off-by: Can Zhang <icloud9957@gmail.com> |
||
|
|
256f0c39e9 |
vmm: Drop 'vfio container' when no active vfio devices
This provides clearer life-cycle management of resources around vfio, and aligns better with the kernel behavior as reported below with vfio legacy mode (with vfio container/group). Fixes: #7328 Signed-off-by: Bo Chen <bchen@crusoe.ai> Signed-off-by: Yi Wang <foxywang@tencent.com> |
||
|
|
8e40413886 |
vmm: validate payload correctly when IGVM is provided
While an IGVM is provided validation fails as there is no kernel or firmware. This patch fixes the sev_snp boot failure. Signed-off-by: Muminul Islam <muislam@microsoft.com> |
||
|
|
5549d846da |
vmm: support firmware boot on mshv arm64
MSHV (Microsoft Hypervisor) doesn't expose an ITS to guests. Instead it exposes a GICv2m MSI Frame for mapping MSIs to SPIs. Update the MADT generation code to create the GIC MSI Frame structure instead of the ITS structure whenever the guest vGIC is using a GICv2m frame. This allows booting guests via firmware on MSHV. Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com> |
||
|
|
690741de13 |
hypervisor: kvm/x86_64: get and set nested guest state
Since the functionality of [0] was backported to kvm-bindings@v0.12.1 and kvm-ioctls@v0.22.1 [1, 2], we can now save nested KVM state. This way, nesting works across state save/resume and live-migration. [0] https://github.com/rust-vmm/kvm/pull/322 [1] https://github.com/rust-vmm/kvm/pull/349 [2] https://github.com/rust-vmm/kvm/pull/350 Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
4c16285dde |
vmm: Fix UB in AMX support checks
Rust's aliasing rules do not permit mutating a `usize` through a shared reference. Unsafe blocks and FFI are no exception. This PR fixes such a violation detected in the AMX support checks by passing a raw mutable pointer instead of a shared reference in the syscall. Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de> On-behalf-of: SAP <oliver.anderson@sap.com> |
||
|
|
a6426e3615 |
devices: gracefully close preserved FDs on device remove
For a graceful resource management of externally provided FDs in Cloud Hypervisor, corresponding FDs need to be closed on a device removal. This is the case for virtio-net devices using external FDs, for example. With the fix introduced in this commit, we allow management software to properly clean up resources, e.g., libvirt can clean up tap devices. PS: CHV uses "added" and "removed", which has the same meaning as hot device attach/hotplug and hot device detach/unplug. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com |
||
|
|
f2dfa7f6e0 |
misc: Use variables directly in format! string
Fix clippy warning `uninlined_format_args` reported by rustc rustc
1.89.0 (29483883e 2025-08-04).
```console
warning: variables can be used directly in the `format!` string
--> block/src/lib.rs:649:17
|
649 | info!("{} failed to create io_uring instance: {}", error_msg, e);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
= note: `#[warn(clippy::uninlined_format_args)]` on by default
help: change this to
|
649 - info!("{} failed to create io_uring instance: {}", error_msg, e);
649 + info!("{error_msg} failed to create io_uring instance: {e}");
|
```
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
|
||
|
|
ea83fe314c |
build: Bump the non-rust-vmm group across 2 directories with 107 updates
Bumps the non-rust-vmm group with 57 updates in the / directory: | Package | From | To | | --- | --- | --- | | [zbus](https://github.com/dbus2/zbus) | `5.7.1` | `5.11.0` | | [serde](https://github.com/serde-rs/serde) | `1.0.208` | `1.0.226` | | [serde_json](https://github.com/serde-rs/json) | `1.0.143` | `1.0.145` | | [serde_with](https://github.com/jonasbb/serde_with) | `3.14.0` | `3.14.1` | | [anyhow](https://github.com/dtolnay/anyhow) | `1.0.99` | `1.0.100` | | [cfg-if](https://github.com/rust-lang/cfg-if) | `1.0.0` | `1.0.3` | | [clap](https://github.com/clap-rs/clap) | `4.5.47` | `4.5.48` | | [log](https://github.com/rust-lang/log) | `0.4.22` | `0.4.28` | | [thiserror](https://github.com/dtolnay/thiserror) | `2.0.12` | `2.0.16` | | [zerocopy](https://github.com/google/zerocopy) | `0.8.26` | `0.8.27` | | [bitfield-struct](https://github.com/wrenger/bitfield-struct-rs) | `0.10.1` | `0.11.0` | | [num_enum](https://github.com/illicitonion/num_enum) | `0.7.3` | `0.7.4` | | [blocking](https://github.com/smol-rs/blocking) | `1.6.1` | `1.6.2` | | [gdbstub](https://github.com/daniel5151/gdbstub) | `0.7.6` | `0.7.7` | | [micro_http](https://github.com/firecracker-microvm/micro-http) | ``bf50989`` | ``3248cee`` | | [anstream](https://github.com/rust-cli/anstyle) | `0.6.19` | `0.6.20` | | [anstyle-query](https://github.com/rust-cli/anstyle) | `1.1.2` | `1.1.4` | | [anstyle-wincon](https://github.com/rust-cli/anstyle) | `3.0.6` | `3.0.10` | | [async-broadcast](https://github.com/smol-rs/async-broadcast) | `0.7.1` | `0.7.2` | | [async-executor](https://github.com/smol-rs/async-executor) | `1.13.1` | `1.13.3` | | [async-io](https://github.com/smol-rs/async-io) | `2.5.0` | `2.6.0` | | [async-lock](https://github.com/smol-rs/async-lock) | `3.4.0` | `3.4.1` | | [async-signal](https://github.com/smol-rs/async-signal) | `0.2.12` | `0.2.13` | | [bumpalo](https://github.com/fitzgen/bumpalo) | `3.16.0` | `3.19.0` | | [cc](https://github.com/rust-lang/cc-rs) | `1.2.34` | `1.2.38` | | [clap_lex](https://github.com/clap-rs/clap) | `0.7.4` | `0.7.5` | | [colorchoice](https://github.com/rust-cli/anstyle) | `1.0.3` | `1.0.4` | | [crc32fast](https://github.com/srijs/rust-crc32fast) | `1.4.2` | `1.5.0` | | [env_filter](https://github.com/rust-cli/env_logger) | `0.1.2` | `0.1.3` | | [errno](https://github.com/lambda-fairy/rust-errno) | `0.3.13` | `0.3.14` | | [event-listener-strategy](https://github.com/smol-rs/event-listener-strategy) | `0.5.3` | `0.5.4` | | [futures-lite](https://github.com/smol-rs/futures-lite) | `2.6.0` | `2.6.1` | | [glob](https://github.com/rust-lang/glob) | `0.3.2` | `0.3.3` | | [hashbrown](https://github.com/rust-lang/hashbrown) | `0.15.4` | `0.15.5` | | [indexmap](https://github.com/indexmap-rs/indexmap) | `2.8.0` | `2.11.4` | | libredox | `0.1.3` | `0.1.10` | | [libz-sys](https://github.com/rust-lang/libz-sys) | `1.1.18` | `1.1.22` | | [lock_api](https://github.com/Amanieu/parking_lot) | `0.4.12` | `0.4.13` | | [memchr](https://github.com/BurntSushi/memchr) | `2.7.2` | `2.7.5` | | [once_cell](https://github.com/matklad/once_cell) | `1.20.2` | `1.21.3` | | [openssl-src](https://github.com/alexcrichton/openssl-src-rs) | `300.3.2+3.3.2` | `300.5.2+3.5.2` | | [openssl-sys](https://github.com/sfackler/rust-openssl) | `0.9.104` | `0.9.109` | | [parking_lot](https://github.com/Amanieu/parking_lot) | `0.12.1` | `0.12.4` | | [pin-project-lite](https://github.com/taiki-e/pin-project-lite) | `0.2.15` | `0.2.16` | | [pkg-config](https://github.com/rust-lang/pkg-config-rs) | `0.3.31` | `0.3.32` | | [polling](https://github.com/smol-rs/polling) | `3.6.0` | `3.11.0` | | [ppv-lite86](https://github.com/cryptocorrosion/cryptocorrosion) | `0.2.20` | `0.2.21` | | [proc-macro-crate](https://github.com/bkchr/proc-macro-crate) | `3.3.0` | `3.4.0` | | [regex](https://github.com/rust-lang/regex) | `1.11.1` | `1.11.2` | | [regex-automata](https://github.com/rust-lang/regex) | `0.4.9` | `0.4.10` | | [regex-syntax](https://github.com/rust-lang/regex) | `0.8.5` | `0.8.6` | | [serde_repr](https://github.com/dtolnay/serde-repr) | `0.1.19` | `0.1.20` | | [tempfile](https://github.com/Stebalien/tempfile) | `3.12.0` | `3.23.0` | | [tracing](https://github.com/tokio-rs/tracing) | `0.1.40` | `0.1.41` | | [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.18` | `1.0.19` | | [wasi](https://github.com/bytecodealliance/wasi-rs) | `0.11.0+wasi-snapshot-preview1` | `0.11.1+wasi-snapshot-preview1` | | [zvariant_utils](https://github.com/dbus2/zbus) | `3.2.0` | `3.2.1` | Bumps the non-rust-vmm group with 44 updates in the /fuzz directory: | Package | From | To | | --- | --- | --- | | [serde](https://github.com/serde-rs/serde) | `1.0.208` | `1.0.226` | | [serde_json](https://github.com/serde-rs/json) | `1.0.143` | `1.0.145` | | [serde_with](https://github.com/jonasbb/serde_with) | `3.14.0` | `3.14.1` | | [cfg-if](https://github.com/rust-lang/cfg-if) | `1.0.0` | `1.0.3` | | [clap](https://github.com/clap-rs/clap) | `4.5.47` | `4.5.48` | | [log](https://github.com/rust-lang/log) | `0.4.22` | `0.4.28` | | [thiserror](https://github.com/dtolnay/thiserror) | `2.0.12` | `2.0.16` | | [zerocopy](https://github.com/google/zerocopy) | `0.8.26` | `0.8.27` | | [num_enum](https://github.com/illicitonion/num_enum) | `0.7.2` | `0.7.4` | | [getrandom](https://github.com/rust-random/getrandom) | `0.2.15` | `0.2.16` | | [gdbstub](https://github.com/daniel5151/gdbstub) | `0.7.6` | `0.7.7` | | [micro_http](https://github.com/firecracker-microvm/micro-http) | ``bf50989`` | ``3248cee`` | | [anstream](https://github.com/rust-cli/anstyle) | `0.6.15` | `0.6.20` | | [anstyle](https://github.com/rust-cli/anstyle) | `1.0.8` | `1.0.11` | | [anstyle-parse](https://github.com/rust-cli/anstyle) | `0.2.5` | `0.2.7` | | [anstyle-query](https://github.com/rust-cli/anstyle) | `1.1.1` | `1.1.4` | | [autocfg](https://github.com/cuviper/autocfg) | `1.3.0` | `1.5.0` | | [bumpalo](https://github.com/fitzgen/bumpalo) | `3.16.0` | `3.19.0` | | [cc](https://github.com/rust-lang/cc-rs) | `1.1.11` | `1.2.38` | | [colorchoice](https://github.com/rust-cli/anstyle) | `1.0.2` | `1.0.4` | | [enumflags2](https://github.com/meithecatte/enumflags2) | `0.7.10` | `0.7.12` | | [equivalent](https://github.com/indexmap-rs/equivalent) | `1.0.1` | `1.0.2` | | [futures-core](https://github.com/rust-lang/futures-rs) | `0.3.30` | `0.3.31` | | [futures-sink](https://github.com/rust-lang/futures-rs) | `0.3.30` | `0.3.31` | | [indexmap](https://github.com/indexmap-rs/indexmap) | `2.5.0` | `2.11.4` | | [itoa](https://github.com/dtolnay/itoa) | `1.0.11` | `1.0.15` | | [lock_api](https://github.com/Amanieu/parking_lot) | `0.4.12` | `0.4.13` | | [memchr](https://github.com/BurntSushi/memchr) | `2.7.4` | `2.7.5` | | [once_cell](https://github.com/matklad/once_cell) | `1.20.2` | `1.21.3` | | [ppv-lite86](https://github.com/cryptocorrosion/cryptocorrosion) | `0.2.20` | `0.2.21` | | [proc-macro-crate](https://github.com/bkchr/proc-macro-crate) | `3.2.0` | `3.4.0` | | [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.92` | `1.0.101` | | [quote](https://github.com/dtolnay/quote) | `1.0.37` | `1.0.40` | | [r-efi](https://github.com/r-efi/r-efi) | `5.2.0` | `5.3.0` | | [rand](https://github.com/rust-random/rand) | `0.9.0` | `0.9.2` | | [rustversion](https://github.com/dtolnay/rustversion) | `1.0.21` | `1.0.22` | | [ryu](https://github.com/dtolnay/ryu) | `1.0.18` | `1.0.20` | | [signal-hook-registry](https://github.com/vorner/signal-hook) | `1.4.2` | `1.4.6` | | [syn](https://github.com/dtolnay/syn) | `2.0.95` | `2.0.106` | | [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.13` | `1.0.19` | | [wasi](https://github.com/bytecodealliance/wasi-rs) | `0.11.0+wasi-snapshot-preview1` | `0.11.1+wasi-snapshot-preview1` | | [arbitrary](https://github.com/rust-fuzz/arbitrary) | `1.4.1` | `1.4.2` | | [libfuzzer-sys](https://github.com/rust-fuzz/libfuzzer) | `0.4.7` | `0.4.10` | | [jobserver](https://github.com/rust-lang/jobserver-rs) | `0.1.32` | `0.1.34` | Updates `zbus` from 5.7.1 to 5.11.0 - [Release notes](https://github.com/dbus2/zbus/releases) - [Commits](https://github.com/dbus2/zbus/compare/zbus-5.7.1...zbus-5.11.0) Updates `serde` from 1.0.208 to 1.0.226 - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.226) Updates `serde_json` from 1.0.143 to 1.0.145 - [Release notes](https://github.com/serde-rs/json/releases) - [Commits](https://github.com/serde-rs/json/compare/v1.0.143...v1.0.145) Updates `serde_with` from 3.14.0 to 3.14.1 - [Release notes](https://github.com/jonasbb/serde_with/releases) - [Commits](https://github.com/jonasbb/serde_with/compare/v3.14.0...v3.14.1) Updates `anyhow` from 1.0.99 to 1.0.100 - [Release notes](https://github.com/dtolnay/anyhow/releases) - [Commits](https://github.com/dtolnay/anyhow/compare/1.0.99...1.0.100) Updates `cfg-if` from 1.0.0 to 1.0.3 - [Release notes](https://github.com/rust-lang/cfg-if/releases) - [Changelog](https://github.com/rust-lang/cfg-if/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-lang/cfg-if/compare/1.0.0...v1.0.3) Updates `clap` from 4.5.47 to 4.5.48 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.47...clap_complete-v4.5.48) Updates `log` from 0.4.22 to 0.4.28 - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.22...0.4.28) Updates `thiserror` from 2.0.12 to 2.0.16 - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](https://github.com/dtolnay/thiserror/compare/2.0.12...2.0.16) Updates `zerocopy` from 0.8.26 to 0.8.27 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](https://github.com/google/zerocopy/compare/v0.8.26...v0.8.27) Updates `bitfield-struct` from 0.10.1 to 0.11.0 - [Release notes](https://github.com/wrenger/bitfield-struct-rs/releases) - [Commits](https://github.com/wrenger/bitfield-struct-rs/compare/0.10.1...0.11.0) Updates `num_enum` from 0.7.3 to 0.7.4 - [Commits](https://github.com/illicitonion/num_enum/compare/0.7.3...0.7.4) Updates `blocking` from 1.6.1 to 1.6.2 - [Release notes](https://github.com/smol-rs/blocking/releases) - [Changelog](https://github.com/smol-rs/blocking/blob/master/CHANGELOG.md) - [Commits](https://github.com/smol-rs/blocking/compare/v1.6.1...v1.6.2) Updates `gdbstub` from 0.7.6 to 0.7.7 - [Release notes](https://github.com/daniel5151/gdbstub/releases) - [Changelog](https://github.com/daniel5151/gdbstub/blob/master/CHANGELOG.md) - [Commits](https://github.com/daniel5151/gdbstub/compare/0.7.6...0.7.7) Updates `micro_http` from `bf50989` to `3248cee` - [Commits]( |
||
|
|
70c798d2b9 |
build: Bump landlock from 0.4.2 to 0.4.3
Bumps [landlock](https://github.com/landlock-lsm/rust-landlock) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/landlock-lsm/rust-landlock/releases) - [Changelog](https://github.com/landlock-lsm/rust-landlock/blob/main/CHANGELOG.md) - [Commits](https://github.com/landlock-lsm/rust-landlock/compare/v0.4.2...v0.4.3) --- updated-dependencies: - dependency-name: landlock dependency-version: 0.4.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> |