Commit Graph

131 Commits

Author SHA1 Message Date
dependabot-preview[bot]
2d7bfdd920 build(deps): bump libc from 0.2.64 to 0.2.65
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.64 to 0.2.65.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.64...0.2.65)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 08:53:20 +00:00
dependabot-preview[bot]
2b60452195 build(deps): bump backtrace from 0.3.39 to 0.3.40
Bumps [backtrace](https://github.com/rust-lang/backtrace-rs) from 0.3.39 to 0.3.40.
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.39...0.3.40)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-17 22:53:26 +00:00
dependabot-preview[bot]
e8a25c22f6 build(deps): bump backtrace from 0.3.38 to 0.3.39
Bumps [backtrace](https://github.com/rust-lang/backtrace-rs) from 0.3.38 to 0.3.39.
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.38...0.3.39)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-17 19:14:34 +00:00
dependabot-preview[bot]
b8be1dc24a build(deps): bump backtrace-sys from 0.1.31 to 0.1.32
Bumps [backtrace-sys](https://github.com/alexcrichton/backtrace-rs) from 0.1.31 to 0.1.32.
- [Release notes](https://github.com/alexcrichton/backtrace-rs/releases)
- [Commits](https://github.com/alexcrichton/backtrace-rs/compare/backtrace-sys-0.1.31...backtrace-sys-0.1.32)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-17 18:40:05 +00:00
dependabot-preview[bot]
83631599a3 build(deps): bump cc from 1.0.45 to 1.0.46
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.45 to 1.0.46.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.45...1.0.46)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-17 06:37:13 +00:00
Sebastien Boeuf
c65ead5de8 vm-virtio: Trigger external map/unmap from virtio-iommu
This patch relies on the trait implementation provided for each device
which requires some sort of external update based on a map or unmap.

Whenever a MAP or UNMAP request comes through the virtqueues, it
triggers a call to the external mapping trait with map()/unmap()
functions being invoked.

Those external mappings are meant to be used from VFIO and vhost-user
devices as they need to update their own mappings. In case of VFIO, the
goal is to update the DMAR table in the physical IOMMU, while vhost-user
devices needs to update their internal representation of the virtqueues.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-10-16 07:27:06 +02:00
Sebastien Boeuf
837bcbc6ba vfio: Create VFIO implementation of ExternalDmaMapping
With this implementation of the trait ExternalDmaMapping, we now have
the tool to provide to the virtual IOMMU to trigger the map/unmap on
behalf of the guest.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-10-16 07:27:06 +02:00
Sebastien Boeuf
34bb31791b vm-device: Add new crate for virtio and VFIO agnostic traits
The new crate vm-device is created here to host the definitions of
traits not meant to be tied to virtio of VFIO specifically. We need to
add a new trait to update external DMA mappings for devices, which is
why the vm-device crate is the right fit for this.

We can expect this crate to be extended later once the design gets
approved from a rust-vmm perspective.

In this specific use case, we can have some devices like VFIO or
vhost-user ones requiring to be notified about mapping updates. This
new trait ExternalDmaMapping will allow such devices to implement their
own way to handle such event.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-10-16 07:27:06 +02:00
dependabot-preview[bot]
3bb51d4d5e build(deps): bump libc from 0.2.62 to 0.2.64
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.62 to 0.2.64.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.62...0.2.64)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-15 19:46:54 +00:00
dependabot-preview[bot]
9e78c2e686 build(deps): bump ryu from 1.0.1 to 1.0.2
Bumps [ryu](https://github.com/dtolnay/ryu) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/dtolnay/ryu/releases)
- [Commits](https://github.com/dtolnay/ryu/compare/1.0.1...1.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-15 05:16:47 +00:00
dependabot-preview[bot]
90d1083bda build(deps): bump syn from 1.0.3 to 1.0.5
Bumps [syn](https://github.com/dtolnay/syn) from 1.0.3 to 1.0.5.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/1.0.3...1.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 11:25:01 +02:00
dependabot-preview[bot]
5ca068a068 build(deps): bump proc-macro2 from 1.0.1 to 1.0.5
Bumps [proc-macro2](https://github.com/alexcrichton/proc-macro2) from 1.0.1 to 1.0.5.
- [Release notes](https://github.com/alexcrichton/proc-macro2/releases)
- [Commits](https://github.com/alexcrichton/proc-macro2/compare/1.0.1...1.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-14 09:23:47 +00:00
dependabot-preview[bot]
ef090cf37d build(deps): bump ryu from 1.0.0 to 1.0.1
Bumps [ryu](https://github.com/dtolnay/ryu) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/dtolnay/ryu/releases)
- [Commits](https://github.com/dtolnay/ryu/compare/1.0.0...1.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-12 09:33:07 +01:00
dependabot-preview[bot]
db3ece8ef2 build(deps): bump failure from 0.1.5 to 0.1.6
Bumps [failure](https://github.com/rust-lang-nursery/failure) from 0.1.5 to 0.1.6.
- [Release notes](https://github.com/rust-lang-nursery/failure/releases)
- [Changelog](https://github.com/rust-lang-nursery/failure/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-lang-nursery/failure/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-12 08:32:38 +00:00
Samuel Ortiz
8e018d6feb vfio: Move vfio-bindings to crates.io
And remove our local vfio-bindings code.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-10-10 10:32:40 +02:00
Samuel Ortiz
c446b9d510 Cargo: Move virtio-bindings to crates.io
v0.1.0 was just published.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-10-10 10:32:40 +02:00
dependabot-preview[bot]
6df7cd0e4b build(deps): bump openssl-sys from 0.9.50 to 0.9.51
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl) from 0.9.50 to 0.9.51.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.50...openssl-sys-v0.9.51)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-10 07:44:14 +00:00
dependabot-preview[bot]
3a04db5936 build(deps): bump arrayvec from 0.4.11 to 0.4.12
Bumps [arrayvec](https://github.com/bluss/arrayvec) from 0.4.11 to 0.4.12.
- [Release notes](https://github.com/bluss/arrayvec/releases)
- [Commits](https://github.com/bluss/arrayvec/compare/0.4.11...0.4.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-10 01:04:35 +00:00
dependabot-preview[bot]
ad7d02cd74 build(deps): bump nodrop from 0.1.13 to 0.1.14
Bumps [nodrop](https://github.com/bluss/arrayvec) from 0.1.13 to 0.1.14.
- [Release notes](https://github.com/bluss/arrayvec/releases)
- [Commits](https://github.com/bluss/arrayvec/compare/nodrop-0.1.13...nodrop-0.1.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-09 15:12:04 +00:00
Samuel Ortiz
14eb071b29 Cargo: Move to crates.io vmm-sys-util
Use the newly published 0.1.1 version.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-10-08 07:28:53 -07:00
Samuel Ortiz
8288cb2ac8 micro_http: Use Firecracker version
As of commit 2b94334a, Firecracker includes all the changes we need.
We can now switch to using it instead of carrying a copy.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-10-04 06:52:34 -07:00
Samuel Ortiz
f674019ea1 vmm: {De}serialize VmConfig
We use the serde crate to serialize and deserialize the VmVConfig
structure. This structure will be passed from the HTTP API caller as a
JSON payload and we need to deserialize it into a VmConfig.

For a convenient use of the HTTP API, we also provide Default traits
implementations for some of the VmConfig fields (vCPUs, memory, etc...).

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-10-04 09:36:33 +02:00
Samuel Ortiz
2371325f9c vmm: api: Add HTTP server
The Cloud Hyper HTTP server runs a synchronous, multi-threaded
loop that receives HTTP requests and tries to call the corresponding
endpoint handlers for the requests URIs.

An endpoint handler will parse the HTTP request and potentially
translate it into and IPC request. The handler holds an notifier and an
mspc Sender for respectively notifying and sending the IPC payload to
the VMM API server. The handler then waits for an API server response
and translate it back into an HTTP response.
The HTTP server is responsible for sending the reponse back to the
caller.

The HTTP server uses a static routes hash table that maps URIs to
endpoint handlers.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-10-04 09:36:33 +02:00
dependabot-preview[bot]
1b66a2fa60 build(deps): bump serde_json from 1.0.40 to 1.0.41
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.40 to 1.0.41.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.40...v1.0.41)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 22:06:24 +00:00
dependabot-preview[bot]
47367eb61b build(deps): bump openssl-sys from 0.9.49 to 0.9.50
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl) from 0.9.49 to 0.9.50.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.49...openssl-sys-v0.9.50)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 09:06:31 +00:00
Cathy Zhang
f6d1a9d9b8 src: Add vhost-user-net backend
Create vhost-user-net backend with Tap interface, to offload network
transaction from cloud-hypervisor. The goal is to provide flexibility
about the backend being in use, but also more security as it will allow
users to isolate the backend with different security profiles since it
will run as a dedicated process on the host.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-09-30 13:06:00 -07:00
Samuel Ortiz
8188074300 main: Start the VMM thread
We now start the main VMM thread, which will be listening for VM and IPC
related events.
In order to start the configured VM, we no longer directly call the VM
API but we use the IPC instead, to first create and then start a VM.

Fixes: #303

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-09-26 16:21:14 +02:00
dependabot-preview[bot]
e869283b4e build(deps): bump cfg-if from 0.1.9 to 0.1.10
Bumps [cfg-if](https://github.com/alexcrichton/cfg-if) from 0.1.9 to 0.1.10.
- [Release notes](https://github.com/alexcrichton/cfg-if/releases)
- [Commits](https://github.com/alexcrichton/cfg-if/compare/0.1.9...0.1.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-24 20:30:43 +00:00
dependabot-preview[bot]
dbff0e94b8 build(deps): bump backtrace from 0.3.37 to 0.3.38
Bumps [backtrace](https://github.com/rust-lang/backtrace-rs) from 0.3.37 to 0.3.38.
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.37...0.3.38)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 20:08:09 +00:00
dependabot-preview[bot]
a2f3da3488 build(deps): bump arc-swap from 0.4.2 to 0.4.3
Bumps [arc-swap](https://github.com/vorner/arc-swap) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/vorner/arc-swap/releases)
- [Changelog](https://github.com/vorner/arc-swap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vorner/arc-swap/compare/v0.4.2...v0.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-21 08:11:43 +00:00
Sebastien Boeuf
0a0c7358a2 virtio-bindings: Rely on the upstream crate from rust-vmm
Now that virtio-bindings is a crate part of the rust-vmm project, we
want to rely on this one instead of the local one we had so far.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2019-09-19 07:13:54 -07:00
dependabot-preview[bot]
bf4f3db6c4 build(deps): bump vmm-sys-util from 07ef2e2 to 27e7ff1
Bumps [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) from `07ef2e2` to `27e7ff1`.
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Commits](07ef2e280e...27e7ff14d6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 11:48:09 +00:00
dependabot-preview[bot]
67ef4f0d74 build(deps): bump linux-loader from b270081 to 6cf23a8
Bumps [linux-loader](https://github.com/rust-vmm/linux-loader) from `b270081` to `6cf23a8`.
- [Release notes](https://github.com/rust-vmm/linux-loader/releases)
- [Commits](b2700818ad...6cf23a8bca)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-17 07:50:59 +00:00
Rob Bradford
3567206059 build, tests: Update to ssh2 0.4.0
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-09-16 13:21:48 +01:00
dependabot-preview[bot]
ea7f4d7f0b build(deps): bump serde from 1.0.100 to 1.0.101
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 11:47:24 +00:00
dependabot-preview[bot]
c0fede0774 build(deps): bump libssh2-sys from 0.2.11 to 0.2.12
Bumps [libssh2-sys](https://github.com/alexcrichton/ssh2-rs) from 0.2.11 to 0.2.12.
- [Release notes](https://github.com/alexcrichton/ssh2-rs/releases)
- [Commits](https://github.com/alexcrichton/ssh2-rs/compare/libssh2-sys-0.2.11...libssh2-sys-0.2.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 11:47:12 +00:00
dependabot-preview[bot]
c00b58de9b build(deps): bump pkg-config from 0.3.15 to 0.3.16
Bumps [pkg-config](https://github.com/rust-lang/pkg-config-rs) from 0.3.15 to 0.3.16.
- [Release notes](https://github.com/rust-lang/pkg-config-rs/releases)
- [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/pkg-config-rs/compare/0.3.15...0.3.16)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 12:48:05 +00:00
dependabot-preview[bot]
5f752dade7 build(deps): bump serde from 1.0.99 to 1.0.100
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.99 to 1.0.100.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.99...v1.0.100)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 08:17:00 +00:00
dependabot-preview[bot]
8e7d67fcfe build(deps): bump vmm-sys-util from 8703cfd to 07ef2e2
Bumps [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) from `8703cfd` to `07ef2e2`.
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Commits](8703cfd427...07ef2e280e)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 08:16:31 +00:00
dependabot-preview[bot]
b515d48eca build(deps): bump cc from 1.0.42 to 1.0.45
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.42 to 1.0.45.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.42...1.0.45)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 08:15:49 +00:00
dependabot-preview[bot]
f740a3568d build(deps): bump getrandom from 0.1.11 to 0.1.12
Bumps [getrandom](https://github.com/rust-random/getrandom) from 0.1.11 to 0.1.12.
- [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.11...v0.1.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-06 14:07:55 +00:00
dependabot-preview[bot]
e21bc972b0 build(deps): bump vmm-sys-util from fd4dcd1 to 8703cfd
Bumps [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) from `fd4dcd1` to `8703cfd`.
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Commits](fd4dcd172e...8703cfd427)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-06 06:37:14 +00:00
dependabot-preview[bot]
d446a8217a build(deps): bump blake2b_simd from 0.5.7 to 0.5.8
Bumps [blake2b_simd](https://github.com/oconnor663/blake2_simd) from 0.5.7 to 0.5.8.
- [Release notes](https://github.com/oconnor663/blake2_simd/releases)
- [Commits](https://github.com/oconnor663/blake2_simd/compare/0.5.7...0.5.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-05 18:41:53 +00:00
dependabot-preview[bot]
2432ad07ea build(deps): bump cc from 1.0.41 to 1.0.42
Bumps [cc](https://github.com/alexcrichton/cc-rs) from 1.0.41 to 1.0.42.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases)
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.41...1.0.42)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-05 16:41:42 +00:00
dependabot-preview[bot]
037807f949 build(deps): bump backtrace from 0.3.36 to 0.3.37
Bumps [backtrace](https://github.com/rust-lang/backtrace-rs) from 0.3.36 to 0.3.37.
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.36...0.3.37)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-04 20:41:39 +00:00
dependabot-preview[bot]
47ca277690 build(deps): bump backtrace from 0.3.35 to 0.3.36
Bumps [backtrace](https://github.com/rust-lang/backtrace-rs) from 0.3.35 to 0.3.36.
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.35...0.3.36)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-04 16:53:46 +00:00
dependabot-preview[bot]
7ce0db90f0 build(deps): bump regex-syntax from 0.6.11 to 0.6.12
Bumps [regex-syntax](https://github.com/rust-lang/regex) from 0.6.11 to 0.6.12.
- [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.11...regex-syntax-0.6.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-03 17:24:30 +00:00
Rob Bradford
ee83c2d44e arch: x86_64: Generate basic ACPI tables
Generate very basic ACPI tables for HW reduced ACPI.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-09-03 19:18:49 +02:00
Rob Bradford
eea6f1dc9e acpi_tables: Add initial ACPI tables support
Add a revision 2 RSDP table only supporting an XSDT along with support
for creating generic SDT based tables.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2019-09-03 19:18:49 +02:00
Samuel Ortiz
8718043dfc cloud-hypervisor: Bump vmm-sys-util crate version
Bump from 829d605 to fd4dcd1.

PR #225 failed because we were still using the vmm-sys-util logging
macros and the crate's syslog module got removed.

This one relies on the previous commit switching to using the
log crate macros instead.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-09-02 15:07:42 +02:00