Commit Graph

6049 Commits

Author SHA1 Message Date
dependabot[bot]
0b7d2caf76 build: bump libc from 0.2.131 to 0.2.132 in /fuzz
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.131 to 0.2.132.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.131...0.2.132)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-18 23:41:40 +00:00
Rob Bradford
396f9ce2c6 vmm: Deprecate non-PVH firmware loading
Curently all the firmware blobs we support can use PVH loading.

See: #4511

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-18 17:29:44 +01:00
Markus Napierkowski
b49f8b9248 virtio-devices: rng: correctly indicate number of bytes written
Reads from the random file may only be partial, e.g., if the random file is an ordinary text
file. When that happens, the device needs to signal to the driver that only parts of the buffer have
been overwritten.

Signed-off-by: Markus Napierkowski <markus.napierkowski@cyberus-technology.de>
2022-08-18 14:44:58 +01:00
Rob Bradford
31dfe3d02a tests: Enable live upgrade tests
Following our recent v26.0 release we can re-enable our live upgrade
tests to try and make it possible for us to move to making LTS releases.

Currently limited to x86-64 as the live upgrade tests fail on aarch64.

Fixes: #3949

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-18 14:41:22 +01:00
Rob Bradford
476e30f5cb Jenkinsfile: Temporarily remove x86-64 bare metal testing
These machines will be temporarily unavailable.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 11:18:47 -07:00
dependabot[bot]
ccc88ccfd2 build: bump libc from 0.2.131 to 0.2.132
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.131 to 0.2.132.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.131...0.2.132)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-17 16:30:47 +00:00
Rob Bradford
ed9e54d6c7 build: Release v26.0
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 16:49:03 +01:00
Rob Bradford
282a1001ef vmm: x86_64: Rename load_firmware() to reflect its purpose
This function only supports loading legacy, non-PVH firmware binaries.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 09:50:42 +01:00
Rob Bradford
0d682e185f vmm: x86_64: Add support for firmware loading
Since our firmware files are still designed to be used via PVH use the
load_kernel() function to load the firmware falling back to legacy
firmware loading if necessary.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 09:50:42 +01:00
Rob Bradford
8ec5a248cd main, vmm: Add option to pass firmware parameter in payload
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 09:50:42 +01:00
Rob Bradford
763ea7da42 vmm: x86_64: Split payload loading into it's own function
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 09:50:42 +01:00
Rob Bradford
2856074d12 vmm: x86_64: Make kernel loading use PayloadConfig
Minor refactoring to start supporting loading a firmware payload

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 09:50:42 +01:00
Rob Bradford
485900eeb4 vmm: x86_64: Use more general name for payload handling
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 09:50:42 +01:00
Rob Bradford
6988da79d2 vmm: x86_64: Split legacy firmware loading into own function
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-17 09:50:42 +01:00
dependabot[bot]
80f7d62e1c build: bump anyhow from 1.0.61 to 1.0.62
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.61...1.0.62)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-17 00:39:07 +00:00
dependabot[bot]
4c5c7fb77c build: bump once_cell from 1.13.0 to 1.13.1 in /fuzz
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-17 00:17:32 +00:00
dependabot[bot]
1b8b2fc1af build: bump once_cell from 1.13.0 to 1.13.1
Bumps [once_cell](https://github.com/matklad/once_cell) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/matklad/once_cell/releases)
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-16 23:44:22 +00:00
dependabot[bot]
7a911db4fa build: bump anyhow from 1.0.61 to 1.0.62 in /fuzz
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.61...1.0.62)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-16 23:44:00 +00:00
Bo Chen
8f3462b3e3 tests: live_migration: Run most tests in parallel
Only the ovs-dpdk live-migration tests need to run sequentially as they
use the same ovs-dpdk setup.

This is to reduce our CI time, particularly for the live-migration
and aarch64 jobs.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 22:42:33 +01:00
Bo Chen
1f70d16c12 tests: Avoid name clashing for 'parallel/sequential' tests
Add prefix 'common_' to make them more specific.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 22:42:33 +01:00
Steven Dake
25f815e7d1 docs: README.md: Use correct package name for qemu-img
The documentation states to install qemu-img. This is located in the
package qemu-utils. The documentation imples the binary is wihtin the
qemu-img package, which doesn't exist.

Signed-off-by: Steven Dake <sdake@lambdal.com>
2022-08-16 10:48:34 -07:00
Bo Chen
76bde33fc4 tests: live-migration: Cleanup ovs-dpdk after terminating VMs
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
9591e225e6 virtio-devices: vhost_user: Fix a typo for error reporting
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
df5b803a63 virtio-devices: Shutdown VMM upon worker thread errors
Fixes: #4462

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
8c38992143 virtio-devices: balloon: Refactor 'handle_event' for readability
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
068ea9a4db virtio-devices: mem: Refactor 'handle_event' for readability
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
b1752994d5 virtio-devices: Report errors from EpollHelperHandler::handle_event
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
a7f3620564 virtio-devices: net: Derive thiserror::Error
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
54c484397e virtio-devices: mem: Derive thiserror::Error
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
f9b36a3412 virtio-devices: block: Derive thiserror::Error
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
1793c1cb39 virtio-devices: balloon: Derive thiserror::Error
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
b67755be17 virtio-devices: Derive thiserror::Error and drop unsed errors
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
4a2539cb92 virtio-devices: vhost-user: Derive thiserror::Error
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
f39b08f21f net_util: Derive thiserror::Error
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Bo Chen
6a1e637a46 block_util: Derive thiserror::Error
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Rob Bradford
041acf2a65 CONTRIBUTING.md: Add sample pre-commit hook
If contributors add this pre-commit hook we should have fewer issues
with build churn on our CI as the most basic checks will pass.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-16 09:42:39 +01:00
dependabot[bot]
2ee7c663c2 build: bump os_str_bytes from 6.2.0 to 6.3.0 in /fuzz
Bumps [os_str_bytes](https://github.com/dylni/os_str_bytes) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/dylni/os_str_bytes/releases)
- [Commits](https://github.com/dylni/os_str_bytes/compare/6.2.0...6.3.0)

---
updated-dependencies:
- dependency-name: os_str_bytes
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 23:42:31 +00:00
dependabot[bot]
b865b059aa build: bump libc from 0.2.129 to 0.2.131
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.129 to 0.2.131.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.129...0.2.131)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 11:46:09 +00:00
dependabot[bot]
1012530bdd build: bump os_str_bytes from 6.2.0 to 6.3.0
Bumps [os_str_bytes](https://github.com/dylni/os_str_bytes) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/dylni/os_str_bytes/releases)
- [Commits](https://github.com/dylni/os_str_bytes/compare/6.2.0...6.3.0)

---
updated-dependencies:
- dependency-name: os_str_bytes
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 10:55:50 +00:00
dependabot[bot]
5b60e5372b build: bump clap from 3.2.16 to 3.2.17
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.16 to 3.2.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.17/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 11:04:39 +01:00
dependabot[bot]
dc540a7549 build: bump clap from 3.2.16 to 3.2.17 in /fuzz
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.16 to 3.2.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/v3.2.17/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.16...v3.2.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-13 00:12:23 +00:00
dependabot[bot]
6c492d8512 build: bump libc from 0.2.129 to 0.2.131 in /fuzz
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.129 to 0.2.131.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.129...0.2.131)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 23:41:15 +00:00
Anatol Belski
944d09208e ci: Initial Windows image integration
This enables the Windows test module. One basic test is enabled,
while all others are disabled yet for aarch64. Jenkins file is
extended with the corresponding step for aarch64.

installAzureCli() is parametrized.

It seems that transferring a 30GB image would take >= 15 minutes. An
optimization here is having a gzip'ed image to 10GB which would unpack
in 3 minutes. Expect to be quicker than transferring an uncompressed
image while on another network.

Signed-off-by: Anatol Belski <ab@php.net>
2022-08-12 15:04:06 +01:00
dependabot[bot]
c591a96ecb build: bump anyhow from 1.0.60 to 1.0.61
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.60...1.0.61)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-12 00:48:16 +00:00
dependabot[bot]
eb0ce4b4d6 build: bump anyhow from 1.0.60 to 1.0.61 in /fuzz
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.60...1.0.61)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 23:41:48 +00:00
Rob Bradford
c59b5e18a8 .github: Move per-commit check (using --tests) to quality checks
This removes the requirement for the tests (dev-dependencies) to build
with all supported toolchains including the MSRV.

See: #4318

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-11 13:18:33 +01:00
Sebastien Boeuf
98f949d35d vmm: Add new I/O ports for ACPI shutdown and PM timer devices
Adding new I/O ports for both the ACPI shutdown and the ACPI PM timer
devices so they can be triggered from both addresses. The reason for
this change is that TDX expects only certain I/O ports to be enabled
based on what QEMU exposes. We follow this to avoid new ports from being
opened exclusively for Cloud Hypervisor.

We have to keep the former I/O ports available given all firmwares
haven't been updated yet. Once we reach a point where we know both Rust
Hypervisor Firmware, OVMF, TDVF and TDSHIM have been updated with the
new port values, we'll be able to remove the former ports.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-08-11 11:46:09 +01:00
Bo Chen
0b182be65e fuzz: block: Remove meaningless setup to the virt-queue
The current fuzzer defines a 'format' for the random input 'bytes' from
libfuzzer, but this 'format' failed to improve the fuzzing
efficiency. Instead, the 'format' parsing process obfuscates the fuzzer and
makes the fuzzing engine much harder to focus on the actual fuzzing
target (e.g. virtio-block queue event handling). It is actually worse than
simply using the random inputs as the virt queue content for fuzzing.

We can later introduce a different 'format' to the input 'bytes' for
better fuzzing, say focusing more on virito-block fuzzing through
ensuring the virt queue content always has a valid 'available'
descriptor chain to process.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-11 09:35:46 +02:00
Bo Chen
fbec4a070d fuzz: block: Ensure the virtio-block thread is killed and joined
This also ensures that the 'queue_evt' is fully processed, as we enforce
the main thread is waiting for the virtio-block thread to process the
'kill_evt' which is after the 'queue_evt' processing.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-11 09:35:46 +02:00
Bo Chen
5ba3b80e83 fuzz: block: Ensure a queue event is properly processed
Currently the main thread returns immediately after sending a 'queue'
event which is rarely received and processed by the virtio-block
thread (unless system is in high workload). In this way, the fuzzer is
mostly doing nothing and is unable to reproduce its behavior
deterministically (from the same inputs). This patch relies on a
'level-triggered' epoll to ensure a 'queue' event is properly processed
before return from the main thread.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-11 09:35:46 +02:00