dependabot[bot]
2cb8c41adc
build: Bump remain from 0.2.14 to 0.2.15
...
Bumps [remain](https://github.com/dtolnay/remain ) from 0.2.14 to 0.2.15.
- [Release notes](https://github.com/dtolnay/remain/releases )
- [Commits](https://github.com/dtolnay/remain/compare/0.2.14...0.2.15 )
---
updated-dependencies:
- dependency-name: remain
dependency-version: 0.2.15
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-26 00:37:52 +00:00
Philipp Schuster
48b67ed03b
net_util: code readability improvements
...
Small cleanup to improve code readability.
Specifically, refactoring a huge loop body into
a function call.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-25 16:22:16 +00:00
Philipp Schuster
e0f0065cbd
net_util: improve Error types
...
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-25 16:22:16 +00:00
dependabot[bot]
1866a85a3d
build: Bump zerocopy from 0.8.24 to 0.8.26
...
Bumps [zerocopy](https://github.com/google/zerocopy ) from 0.8.24 to 0.8.26.
- [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.24...v0.8.26 )
---
updated-dependencies:
- dependency-name: zerocopy
dependency-version: 0.8.26
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-25 10:07:20 +00:00
Hengqi Chen
8338fa642f
net_util: Drop duplicated virtio_features_to_tap_offload
...
The virtio_features_to_tap_offload() defined in ctrl_queue.rs
is duplicated. Remove it and use the one defined in lib.rs
instead.
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com >
2025-06-24 17:43:22 +00:00
Wei Liu
a5287c6f67
build: Consolidate UUID crate to workspace
...
Signed-off-by: Wei Liu <liuwe@microsoft.com >
2025-06-24 16:50:35 +00:00
Philipp Schuster
fe07617f5d
misc: add __pycache__ to gitignore
...
Running `gitlint` locally produces a __pycache__ directory in
`scripts/gitlint/rules/`. It makes sense to exclude this directory.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-24 11:22:00 +00:00
dependabot[bot]
1820c22ba4
build: Bump cc from 1.2.23 to 1.2.27
...
Bumps [cc](https://github.com/rust-lang/cc-rs ) from 1.2.23 to 1.2.27.
- [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.23...cc-v1.2.27 )
---
updated-dependencies:
- dependency-name: cc
dependency-version: 1.2.27
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-24 04:25:02 +00:00
dependabot[bot]
f828e16d62
build: Bump syn from 2.0.87 to 2.0.104
...
Bumps [syn](https://github.com/dtolnay/syn ) from 2.0.87 to 2.0.104.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.87...2.0.104 )
---
updated-dependencies:
- dependency-name: syn
dependency-version: 2.0.104
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-24 02:37:24 +00:00
Demi Marie Obenour
24998c1672
vmm: do not treat libc::MAP_FAILED as a pointer
...
It will likely be safely rejected by the kernel, but it's still wrong.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com >
2025-06-23 09:06:32 +00:00
Wei Liu
821f7994fc
build: Bump UUID crate to 1.17.0
...
Signed-off-by: Wei Liu <liuwe@microsoft.com >
2025-06-21 14:27:19 +00:00
Philipp Schuster
4182ef91e0
misc: remove once_cell; superseded by std::*
...
We now have types in the Rust standard library.
Dropping the dependency.
I found this by using the `clippy::pedantic` group.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-21 14:25:20 +00:00
Demi Marie Obenour
100c6d8142
docs: SGX virt changes are upstream
...
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com >
2025-06-20 10:21:04 +00:00
Demi Marie Obenour
269976c7b3
block: Remove unnecessary pointer indirection
...
No functional change intended.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com >
2025-06-20 10:21:04 +00:00
Demi Marie Obenour
8769b78bf3
arch: x86_64: Require that types to be checksummed are ByteValued
...
Checksumming a type that has padding would use the padding in the
checksum, which is definitely wrong and is often unsound.
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com >
2025-06-20 10:21:04 +00:00
Philipp Schuster
a991de9955
vmm: streamline Display impl of Error types
...
Streamlines the code base by using thiserror's #[error] attribute
consistently for implementing `Display`.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-20 10:19:35 +00:00
dependabot[bot]
47c9ddfa7e
build: Bump hashbrown from 0.15.2 to 0.15.4
...
Bumps [hashbrown](https://github.com/rust-lang/hashbrown ) from 0.15.2 to 0.15.4.
- [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/commits/v0.15.4 )
---
updated-dependencies:
- dependency-name: hashbrown
dependency-version: 0.15.4
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-17 01:49:45 +00:00
Bo Chen
2b05753716
ci: Update reference kernel to 'v6.12.8-20250613'
...
This bump also includes another release 'ch-release-v6.12.8-20250422'
that changed the naming convention of the released kernel binaries
[1]. As a result, few changes are made to our integration tests and test
scripts.
[1] https://github.com/cloud-hypervisor/linux/releases/tag/ch-release-v6.12.8-20250422
Signed-off-by: Bo Chen <bchen@crusoe.ai >
2025-06-16 17:59:22 +00:00
Yi Wang
80f4bfac00
block: keep lifetime consistent from input to output
...
Cargo fuzz build report an error:
error: lifetime flowing from input to output with different syntax can be confusing
--> /home/runner/work/cloud-hypervisor/cloud-hypervisor/block/src/lib.rs:747:13
|
747 | fn file(&mut self) -> MutexGuard<F>;
| ^^^^^^^^^ ------------- the lifetime gets resolved as `'_`
| |
| this lifetime flows to the output
error: lifetime flowing from input to output with different syntax can be confusing
--> /home/runner/work/cloud-hypervisor/cloud-hypervisor/block/src/async_io.rs:68:11
|
68 | fn fd(&mut self) -> BorrowedDiskFd;
| ^^^^^^^^^ -------------- the lifetime gets resolved as `'_`
| |
| this lifetime flows to the output
Signed-off-by: Yi Wang <foxywang@tencent.com >
2025-06-16 06:25:57 +00:00
dependabot[bot]
b26b09ec0c
build: Bump crate-ci/typos from 1.32.0 to 1.33.1
...
Bumps [crate-ci/typos](https://github.com/crate-ci/typos ) from 1.32.0 to 1.33.1.
- [Release notes](https://github.com/crate-ci/typos/releases )
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crate-ci/typos/compare/v1.32.0...v1.33.1 )
---
updated-dependencies:
- dependency-name: crate-ci/typos
dependency-version: 1.33.1
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-14 00:42:13 +00:00
dependabot[bot]
39a6664e62
build: Bump event-listener from 5.3.1 to 5.4.0
...
Bumps [event-listener](https://github.com/smol-rs/event-listener ) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/smol-rs/event-listener/releases )
- [Changelog](https://github.com/smol-rs/event-listener/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/event-listener/compare/v5.3.1...v5.4.0 )
---
updated-dependencies:
- dependency-name: event-listener
dependency-version: 5.4.0
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-13 23:58:27 +00:00
Philipp Schuster
190a11f212
ch-remote: also pretty-print remote server errors
...
Remote server errors are transferred as raw HTTP body. This way,
we lose the nested structured error information.
This is an attempt to retrieve the errors from the HTTP response
and to align the output with the normal error output.
For example, this produces the following chain of errors. Note
that everything after level 0 was retrieved from the HTTP server
response:
```
Error: ch-remote exited with the following chain of errors:
0: http client error
1: Server responded with InternalServerError
2: Error from API
3: The disk could not be added to the VM
4: Failed to validate config
5: Identifier disk1 is not unique
Debug Info: HttpApiClient(ServerResponse(InternalServerError, Some("Error from API<br>The disk could not be added to the VM<br>Failed to validate config<br>Identifier disk1 is not unique")))
```
In case the JSON can't be parsed properly, ch-remote will print:
```
Error: ch-remote exited with the following chain of errors:
0: http client error
X: Can't get remote's error messages from JSON response: EOF while parsing a value at line 1 column 0: body=''
Debug Info: HttpApiClient(ServerResponse(InternalServerError, Some("")))
```
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
6ea132708c
vmm: use Error trait directly with Note for compiler bug
...
While working on this, I found a subtle but severe compiler bug [0].
To fight the bug with explicitness rather than implicitness (to
prevent weird stuff in the future), this change is beneficial.
The bug is at least in Rust stable 1.34..1.87.
[0]: https://github.com/rust-lang/rust/issues/141673
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
060c9de07f
vmm: introduce nice error messages on exit (CHV and ch-remote)
...
With the foundations of each error type implementing std::error::Error,
we can now nicely walk the `.source()` chain and print an error trace.
This commit introduces improved user-facing error printing when:
- Cloud Hypervisor fails with an error
- ch-remote fails (client error)
- ch-remote fails (remote error)
The additional context is a clear improvement in UX for both users and
developers. In the following example, the new behaviour is shown for
a direct invocation of Cloud Hypervisor leading to a failure. This
looks similar for ch-remote.
```
Old Style
`target/release/cloud-hypervisor --api-socket /tmp/chv2.sock --kernel /etc/bootitems/linux/kernel_minimal/stable.bzImage --cmdline console=ttyS0 --serial tty --console off --disk path=img.raw --initramfs /etc/bootitems/linux/initrd_minimal/default`
Error booting VM: VmBoot(LockingError(BlockError(LockDiskImage(AlreadyLocked)))
```
```
`target/release/cloud-hypervisor --api-socket /tmp/chv2.sock --kernel /etc/bootitems/linux/kernel_minimal/stable.bzImage --cmdline console=ttyS0 --serial tty --console off --disk path=img.raw --initramfs
/etc/bootitems/linux/initrd_minimal/default`
Error: Cloud Hypervisor exited with the following chain of errors:
0: Error booting VM
1: The VM could not boot
2: Error locking disk images: Another instance likely holds a lock
3: Cannot lock images of all block devices
4: Failed to get Write lock for disk image: ./img.raw
5: The file is already locked
Debug Info: VmBoot(VmBoot(LockingError(DiskLockError(LockDiskImage { error: AlreadyLocked, lock_type: Write, path: "./raw_disk.bin" })))
```
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
1433763d40
misc: virtio-devices: manual adjustment of special case
...
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
30ee2c129d
misc: vm-migration: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
9bf15ed280
misc: vhost_user_net: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
ed63b352d1
misc: vhost_user_block: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
8e2973fe7c
misc: virtio-devices: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
3541cebbf1
misc: tpm: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
1ede418dcc
misc: test_infra: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
1b03e59152
misc: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
8f56de713b
misc: rate_limiter: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
2100d8c30f
misc: performance-metrics: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
a3692144f0
misc: pci: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
192b19c060
misc: option_parser: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
67896333e3
misc: net_util: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
72c8178335
misc: hypervisor: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
1b91aa8ef3
misc: devices: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
5711f31995
misc: ch-remote: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
aebbd1aecd
misc: block: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
06a868cb85
misc: arch: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
3f3489e38e
misc: api_client: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
d7edd9d51f
misc: vmm: streamline error Display::fmt()
...
The changes were mostly automatically applied using the following
Python script:
```python
import os, re
for root, _, files in os.walk("."):
for f in files:
if not f.endswith(".rs"):
continue
p = os.path.join(root, f)
with open(p, "r", encoding="utf-8") as file:
lines = file.readlines()
changed = False
for i in range(len(lines) - 1):
if re.search(r'#\[error\(".*: \{0[^}]*\}"\)\]', lines[i]) and "#[source]" in lines[i + 1].strip():
lines[i] = re.sub(r': \{0[^}]*\}"\)\]', '")]', lines[i])
changed = True
if changed:
with open(p, "w", encoding="utf-8") as file:
file.writelines(lines)
print("Fixed:", p)
```
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
# Conflicts:
# vmm/src/api/http/mod.rs
2025-06-13 19:55:54 +00:00
Philipp Schuster
4987d63b6a
vmm: fix typo
...
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
53e9c94e68
tests: cleanup test_util module
...
We can remove the `tests` module as the entire file is only
available when running tests.
Follow-up of #7130 / 1f13165fae .
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:02:39 +00:00
dependabot[bot]
9d8bda20e5
build: Bump object from 0.36.5 to 0.36.7
...
Bumps [object](https://github.com/gimli-rs/object ) from 0.36.5 to 0.36.7.
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md )
- [Commits](https://github.com/gimli-rs/object/compare/0.36.5...0.36.7 )
---
updated-dependencies:
- dependency-name: object
dependency-version: 0.36.7
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-13 00:25:40 +00:00
dependabot[bot]
63d7f562e5
build: Bump houseabsolute/actions-rust-cross from 0 to 1
...
Bumps [houseabsolute/actions-rust-cross](https://github.com/houseabsolute/actions-rust-cross ) from 0 to 1.
- [Release notes](https://github.com/houseabsolute/actions-rust-cross/releases )
- [Changelog](https://github.com/houseabsolute/actions-rust-cross/blob/v1/Changes.md )
- [Commits](https://github.com/houseabsolute/actions-rust-cross/compare/v0...v1 )
---
updated-dependencies:
- dependency-name: houseabsolute/actions-rust-cross
dependency-version: '1'
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-06-13 00:09:49 +00:00
Philipp Schuster
9bd9c0cb71
misc: replace manual From<T> for *Error with #[from]
...
This is a small simplification we can use since we use `thiserror`
anyway. Note that `#[from]` implies `#[source]` [0].
[0]: https://docs.rs/thiserror/2.0.12/thiserror/index.html
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-12 15:55:54 +00:00
Philipp Schuster
d594107c0d
ch-remote: sort all commands and args alphabetically
...
Having them sorted alphabetically makes more sense since there are
already many, and the list is growing. This improves the UX for users
and developers.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-12 13:53:55 +00:00