Commit Graph

232 Commits

Author SHA1 Message Date
dependabot-preview[bot]
281b99af0a build(deps): bump micro_http from 803c8fa to 52e21d0
Bumps [micro_http](https://github.com/firecracker-microvm/firecracker) from `803c8fa` to `52e21d0`.
- [Release notes](https://github.com/firecracker-microvm/firecracker/releases)
- [Commits](803c8fae14...52e21d0f9e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-15 07:26:59 +00:00
dependabot-preview[bot]
0acabcdd27 build(deps): bump libssh2-sys from 0.2.13 to 0.2.14
Bumps [libssh2-sys](https://github.com/alexcrichton/ssh2-rs) from 0.2.13 to 0.2.14.
- [Release notes](https://github.com/alexcrichton/ssh2-rs/releases)
- [Commits](https://github.com/alexcrichton/ssh2-rs/compare/libssh2-sys-0.2.13...libssh2-sys-0.2.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-15 07:26:40 +00:00
dependabot-preview[bot]
85f43c7026 build(deps): bump micro_http from edbff4c to 803c8fa
Bumps [micro_http](https://github.com/firecracker-microvm/firecracker) from `edbff4c` to `803c8fa`.
- [Release notes](https://github.com/firecracker-microvm/firecracker/releases)
- [Commits](edbff4ce62...803c8fae14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-14 06:42:28 +00:00
dependabot-preview[bot]
41895d7df1 build(deps): bump rand from 0.7.2 to 0.7.3
Bumps [rand](https://github.com/rust-random/rand) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 16:24:25 +00:00
dependabot-preview[bot]
85d155543e build(deps): bump micro_http from 0987cdc to edbff4c
Bumps [micro_http](https://github.com/firecracker-microvm/firecracker) from `0987cdc` to `edbff4c`.
- [Release notes](https://github.com/firecracker-microvm/firecracker/releases)
- [Commits](0987cdc52b...edbff4ce62)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 16:24:25 +00:00
dependabot-preview[bot]
3430e20f64 build(deps): bump memchr from 2.2.1 to 2.3.0
Bumps [memchr](https://github.com/BurntSushi/rust-memchr) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/BurntSushi/rust-memchr/releases)
- [Commits](https://github.com/BurntSushi/rust-memchr/compare/2.2.1...2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 16:24:25 +00:00
dependabot-preview[bot]
7d853241ad build(deps): bump constant_time_eq from 0.1.4 to 0.1.5
Bumps [constant_time_eq](https://github.com/cesarb/constant_time_eq) from 0.1.4 to 0.1.5.
- [Release notes](https://github.com/cesarb/constant_time_eq/releases)
- [Commits](https://github.com/cesarb/constant_time_eq/compare/0.1.4...0.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 16:24:25 +00:00
dependabot-preview[bot]
fc8bfe07f3 build(deps): bump backtrace from 0.3.40 to 0.3.41
Bumps [backtrace](https://github.com/rust-lang/backtrace-rs) from 0.3.40 to 0.3.41.
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.40...0.3.41)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 16:24:25 +00:00
dependabot-preview[bot]
345c922cb9 build(deps): bump micro_http from 0bfaf39 to 0987cdc
Bumps [micro_http](https://github.com/firecracker-microvm/firecracker) from `0bfaf39` to `0987cdc`.
- [Release notes](https://github.com/firecracker-microvm/firecracker/releases)
- [Commits](0bfaf39af1...0987cdc52b)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-10 07:18:48 +00:00
dependabot-preview[bot]
b38beb606f build(deps): bump regex-syntax from 0.6.12 to 0.6.13
Bumps [regex-syntax](https://github.com/rust-lang/regex) from 0.6.12 to 0.6.13.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/regex-syntax-0.6.12...regex-syntax-0.6.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 20:55:02 +00:00
dependabot-preview[bot]
9d775a140f build(deps): bump pnet from 0.23.0 to 0.25.0
Bumps [pnet](https://github.com/libpnet/libpnet) from 0.23.0 to 0.25.0.
- [Release notes](https://github.com/libpnet/libpnet/releases)
- [Commits](https://github.com/libpnet/libpnet/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 08:07:19 +00:00
dependabot-preview[bot]
70d80cc064 build(deps): bump pnet_sys from 0.23.0 to 0.23.1
Bumps [pnet_sys](https://github.com/libpnet/libpnet) from 0.23.0 to 0.23.1.
- [Release notes](https://github.com/libpnet/libpnet/releases)
- [Commits](https://github.com/libpnet/libpnet/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 07:33:18 +00:00
dependabot-preview[bot]
f493d434ba build(deps): bump vm-memory from 467eda6 to 218afdd
Bumps [vm-memory](https://github.com/rust-vmm/vm-memory) from `467eda6` to `218afdd`.
- [Release notes](https://github.com/rust-vmm/vm-memory/releases)
- [Commits](467eda62ae...218afddd4f)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 07:08:08 +00:00
dependabot-preview[bot]
2500d0aaac build(deps): bump micro_http from 2953365 to 0bfaf39
Bumps [micro_http](https://github.com/firecracker-microvm/firecracker) from `2953365` to `0bfaf39`.
- [Release notes](https://github.com/firecracker-microvm/firecracker/releases)
- [Commits](29533658e5...0bfaf39af1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 07:07:55 +00:00
dependabot-preview[bot]
279c4f91a3 build(deps): bump pnet_macros from 0.23.0 to 0.25.0
Bumps [pnet_macros](https://github.com/libpnet/libpnet) from 0.23.0 to 0.25.0.
- [Release notes](https://github.com/libpnet/libpnet/releases)
- [Commits](https://github.com/libpnet/libpnet/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-09 07:05:53 +00:00
dependabot-preview[bot]
0d2e38db25 build(deps): bump cc from 1.0.49 to 1.0.50
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.49 to 1.0.50.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.49...1.0.50)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-08 17:00:07 +00:00
dependabot-preview[bot]
d756844096 build(deps): bump getrandom from 0.1.13 to 0.1.14
Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.1.13 to 0.1.14.
- [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.1.13...v0.1.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-07 13:54:27 +00:00
dependabot-preview[bot]
9d3f656572 build(deps): bump cc from 1.0.48 to 1.0.49
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.48 to 1.0.49.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.48...1.0.49)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-07 08:14:13 +00:00
dependabot-preview[bot]
f59665e8aa build(deps): bump epoll from 4.0.1 to 4.1.0
Bumps [epoll](https://github.com/nathansizemore/epoll) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/nathansizemore/epoll/releases)
- [Commits](https://github.com/nathansizemore/epoll/compare/4.0.1...4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-07 07:39:59 +00:00
dependabot-preview[bot]
9482ded365 build(deps): bump micro_http from aec25f9 to 2953365
Bumps [micro_http](https://github.com/firecracker-microvm/firecracker) from `aec25f9` to `2953365`.
- [Release notes](https://github.com/firecracker-microvm/firecracker/releases)
- [Commits](aec25f9e5a...29533658e5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-07 07:08:03 +00:00
dependabot-preview[bot]
e4ea60dd96 build(deps): bump rand from 0.7.0 to 0.7.2
Bumps [rand](https://github.com/rust-random/rand) from 0.7.0 to 0.7.2.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.7.0...0.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 08:32:44 +00:00
dependabot-preview[bot]
44dd056647 build(deps): bump remain from 0.1.5 to 0.2.0
Bumps [remain](https://github.com/dtolnay/remain) from 0.1.5 to 0.2.0.
- [Release notes](https://github.com/dtolnay/remain/releases)
- [Commits](https://github.com/dtolnay/remain/compare/0.1.5...0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 08:26:02 +00:00
dependabot-preview[bot]
091c9d9f93 build(deps): bump pnet from 0.22.0 to 0.23.0
Bumps [pnet](https://github.com/libpnet/libpnet) from 0.22.0 to 0.23.0.
- [Release notes](https://github.com/libpnet/libpnet/releases)
- [Commits](https://github.com/libpnet/libpnet/commits/v0.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 07:53:56 +00:00
dependabot-preview[bot]
d8c3912a18 build(deps): bump micro_http from be97831 to aec25f9
Bumps [micro_http](https://github.com/firecracker-microvm/firecracker) from `be97831` to `aec25f9`.
- [Release notes](https://github.com/firecracker-microvm/firecracker/releases)
- [Commits](be978312ea...aec25f9e5a)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 07:26:24 +00:00
dependabot-preview[bot]
1a28f64d5d build(deps): bump atty from 0.2.13 to 0.2.14
Bumps [atty](https://github.com/softprops/atty) from 0.2.13 to 0.2.14.
- [Release notes](https://github.com/softprops/atty/releases)
- [Changelog](https://github.com/softprops/atty/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/atty/compare/0.2.13...0.2.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 07:26:09 +00:00
dependabot-preview[bot]
8f6cbf849a build(deps): bump vm-memory from 291dc2e to 467eda6
Bumps [vm-memory](https://github.com/rust-vmm/vm-memory) from `291dc2e` to `467eda6`.
- [Release notes](https://github.com/rust-vmm/vm-memory/releases)
- [Commits](291dc2e236...467eda62ae)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-06 07:25:53 +00:00
dependabot-preview[bot]
5a0d01ca13 build(deps): bump blake2b_simd from 0.5.9 to 0.5.10
Bumps [blake2b_simd](https://github.com/oconnor663/blake2_simd) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/oconnor663/blake2_simd/releases)
- [Commits](https://github.com/oconnor663/blake2_simd/compare/0.5.9...0.5.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-05 09:03:50 +00:00
dependabot-preview[bot]
38c0d328c2 build(deps): bump syn from 1.0.12 to 1.0.13
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.12 to 1.0.13.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.12...1.0.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-03 17:50:44 +00:00
Rob Bradford
b2589d4f3f vm-virtio, vmm, vfio: Store GuestMemoryMmap in an Arc<ArcSwap<T>>
This allows us to change the memory map that is being used by the
devices via an atomic swap (by replacing the map with another one). The
ArcSwap provides the mechanism for atomically swapping from to another
whilst still giving good read performace. It is inside an Arc so that we
can use a single ArcSwap for all users.

Not covered by this change is replacing the GuestMemoryMmap itself.

This change also removes some vertical whitespace from use blocks in the
files that this commit also changed. Vertical whitespace was being used
inconsistently and broke rustfmt's behaviour of ordering the imports as
it would only do it within the block.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-01-02 13:20:11 +00:00
dependabot-preview[bot]
5c0bb38a65 build(deps): bump vm-memory from 09c119f to 291dc2e
Bumps [vm-memory](https://github.com/rust-vmm/vm-memory) from `09c119f` to `291dc2e`.
- [Release notes](https://github.com/rust-vmm/vm-memory/releases)
- [Commits](09c119f742...291dc2e236)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-02 08:03:05 +00:00
dependabot-preview[bot]
b9971302be build(deps): bump syn from 1.0.11 to 1.0.12
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.11...1.0.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-02 08:02:34 +00:00
dependabot-preview[bot]
fda8a04ec2 build(deps): bump vm-memory from 3ef06be to 09c119f
Bumps [vm-memory](https://github.com/rust-vmm/vm-memory) from `3ef06be` to `09c119f`.
- [Release notes](https://github.com/rust-vmm/vm-memory/releases)
- [Commits](3ef06beaea...09c119f742)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-26 07:07:41 +00:00
dependabot-preview[bot]
34e35c9ae0 build(deps): bump anyhow from 1.0.25 to 1.0.26
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.25 to 1.0.26.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.25...1.0.26)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-24 07:00:35 +00:00
dependabot-preview[bot]
95352db1e5 build(deps): bump vm-memory from ec69de9 to 3ef06be
Bumps [vm-memory](https://github.com/rust-vmm/vm-memory) from `ec69de9` to `3ef06be`.
- [Release notes](https://github.com/rust-vmm/vm-memory/releases)
- [Commits](ec69de9c07...3ef06beaea)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-24 07:00:00 +00:00
dependabot-preview[bot]
bcfe546ea2 build(deps): bump vm-memory from bb29ec8 to ec69de9
Bumps [vm-memory](https://github.com/rust-vmm/vm-memory) from `bb29ec8` to `ec69de9`.
- [Release notes](https://github.com/rust-vmm/vm-memory/releases)
- [Commits](bb29ec8713...ec69de9c07)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-23 07:11:13 +00:00
Sebastien Boeuf
43d2e09e1f ci: Add unit tests to compare CLI and OpenAPI
The goal here is to ensure that CLI and OpenAPI both behave as closely
as possible, and also that they behave as expected.

Leveraging the reorganization of the code, we can now compare two
VmConfig structures generated from one CLI entry on one side, and from
an OpenAPI entry (JSON payload) on the other side.

Fixes #535

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-12-16 16:48:59 +01:00
Sebastien Boeuf
43bd0e53c4 main: Move VmParams creation into a dedicated function
This brings more modularity to the code, which will be helpful when we
will later test the CLI and OpenAPI generate the same VmConfig output.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-12-16 16:48:59 +01:00
dependabot-preview[bot]
11750efb78 build(deps): bump log from 0.4.8 to 0.4.10
Bumps [log](https://github.com/rust-lang/log) from 0.4.8 to 0.4.10.
- [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.8...0.4.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 14:46:05 +00:00
dependabot-preview[bot]
dea5776fb9 build(deps): bump serde from 1.0.103 to 1.0.104
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.103 to 1.0.104.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.103...v1.0.104)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 08:15:47 +00:00
dependabot-preview[bot]
7909f7a8c9 build(deps): bump serde_derive from 1.0.103 to 1.0.104
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.103 to 1.0.104.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.103...v1.0.104)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-16 07:05:03 +00:00
Samuel Ortiz
fa0fdc6500 cargo: Update Cargo.lock for the 0.4.0 release
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-12-13 12:21:13 +01:00
dependabot-preview[bot]
a002093a55 build(deps): bump anyhow from 1.0.23 to 1.0.25
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.23 to 1.0.25.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.23...1.0.25)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-13 08:29:30 +01:00
dependabot-preview[bot]
43f0478fa8 build(deps): bump thiserror from 1.0.6 to 1.0.9
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.6 to 1.0.9.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.6...1.0.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-13 06:38:08 +00:00
Samuel Ortiz
664431ff14 vsock: vhost_user: vfio: Fix potential host memory overflow
The vsock packets that we're building are resolving guest addresses to
host ones and use the latter as raw pointers.
If the corresponding guest mapped buffer spans across several regions in
the guest, they will do so in the host as well. Since we have no
guarantees that host regions are contiguous, it may lead the VMM into
trying to access memory outside of its memory space.

For now we fix that by ensuring that the guest buffers do not span
across several regions. If they do, we error out.
Ideally, we should enhance the rust-vmm memory model to support safe
acces across host regions.

Fixes CVE-2019-18960

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-12-12 22:15:50 +01:00
Samuel Ortiz
37557c8b35 vmm: vm: Implement the Pausable trait
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-12-12 08:50:36 +01:00
Samuel Ortiz
35dd1523c9 vmm: device_manager: Implement the Pausable trait
Since the Snapshotable placeholder and Migratable traits are provided as
well, the DeviceManager object and all its objects are now Migratable.

All Migratable devices are tracked as Arc<Mutex<dyn Migratable>>
references.

Keeping track of all migratable devices allows for implementing the
Migratable trait for the DeviceManager structure, making the whole
device model potentially migratable.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-12-12 08:50:36 +01:00
Samuel Ortiz
0361df4ae0 vm-device: Initial Migratable trait
The Migratable trait groups all expected capabilities of devices and
components that can be migrated.

For a component to be migrated, it must be able to pause and resume.
Once paused, it should be able to provide a snapshot of itself. It
should also be able to restore itself from a snaphot.

As a consequence, the Migratable trait will be split between the
Pausable and the Snapshotable traits. This commit only adds the
Pausable one.

All migratable devices will be tracked from the DeviceManager.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-12-12 08:50:36 +01:00
Rob Bradford
c61104df47 vmm: Port to latest vmm-sys-util
The signal handling for vCPU signals has changed in the latest release
so switch to the new API.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-12-11 14:11:11 +00:00
dependabot-preview[bot]
0374c3dc71 build(deps): bump ssh2 from 0.5.0 to 0.6.0
Bumps [ssh2](https://github.com/alexcrichton/ssh2-rs) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/alexcrichton/ssh2-rs/releases)
- [Commits](https://github.com/alexcrichton/ssh2-rs/compare/0.5.0...0.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-09 05:53:30 +00:00
dependabot-preview[bot]
904b1ea599 build(deps): bump unicode-width from 0.1.6 to 0.1.7
Bumps [unicode-width](https://github.com/unicode-rs/unicode-width) from 0.1.6 to 0.1.7.
- [Release notes](https://github.com/unicode-rs/unicode-width/releases)
- [Commits](https://github.com/unicode-rs/unicode-width/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-05 23:19:28 +00:00