Rob Bradford
237cb184b4
vm-virtio: net: Add further missing error reporting
...
Ensure that errors generated from rx_single_frame are propagated
correctly.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-06-02 13:26:52 +02:00
Rob Bradford
36d072e69c
vm-virtio: Add error propagation for TAP listener (un)registration
...
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-06-02 13:26:52 +02:00
Rob Bradford
3151b5d82a
vm-virtio: net: Refactor to support code reuse
...
Split out functions that work just on the TAP device and queues. Whilst
doing so also improve the error handling to return Results rather than
drop errors.
This change also addresses a bug where the TAP event suppression could
ineffectual because it was being enabled immediately after it may have
been disabled:
resume_rx -> rx_single_frame -> unregister_listener -> resume_rx ->
register_listener.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-06-02 13:26:52 +02:00
dependabot-preview[bot]
22be88d3fb
build(deps): bump vfio-bindings from 887b3cf to f08cbcb
...
Bumps [vfio-bindings](https://github.com/rust-vmm/vfio-bindings ) from `887b3cf` to `f08cbcb`.
- [Release notes](https://github.com/rust-vmm/vfio-bindings/releases )
- [Commits](https://github.com/rust-vmm/vfio-bindings/compare/887b3cf877cd4807a2047d6aac1cb94e3861a240...f08cbcbf4041c981441d9c036c49ebad5098ed1c )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-06-02 11:54:09 +01:00
dependabot-preview[bot]
6121f4626b
build(deps): bump vfio-bindings from 46ef9d4 to 887b3cf
...
Bumps [vfio-bindings](https://github.com/rust-vmm/vfio-bindings ) from `46ef9d4` to `887b3cf`.
- [Release notes](https://github.com/rust-vmm/vfio-bindings/releases )
- [Commits](https://github.com/rust-vmm/vfio-bindings/compare/46ef9d418e8d75b6a4b96f3bbc04e6eb47fef54b...887b3cf877cd4807a2047d6aac1cb94e3861a240 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-06-02 09:22:29 +01:00
dependabot-preview[bot]
b731e63a8c
build(deps): bump ryu from 1.0.4 to 1.0.5
...
Bumps [ryu](https://github.com/dtolnay/ryu ) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/dtolnay/ryu/releases )
- [Commits](https://github.com/dtolnay/ryu/compare/1.0.4...1.0.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-06-01 08:51:44 +01:00
dependabot-preview[bot]
d2d5ccb163
build(deps): bump proc-macro2 from 1.0.17 to 1.0.18
...
Bumps [proc-macro2](https://github.com/alexcrichton/proc-macro2 ) from 1.0.17 to 1.0.18.
- [Release notes](https://github.com/alexcrichton/proc-macro2/releases )
- [Commits](https://github.com/alexcrichton/proc-macro2/compare/1.0.17...1.0.18 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-06-01 08:51:26 +01:00
dependabot-preview[bot]
a1b9131bc6
build(deps): bump syn from 1.0.29 to 1.0.30
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.29 to 1.0.30.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.29...1.0.30 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-06-01 08:51:12 +01:00
dependabot-preview[bot]
2571b27966
build(deps): bump vcpkg from 0.2.8 to 0.2.9
...
Bumps [vcpkg](https://github.com/mcgoo/vcpkg-rs ) from 0.2.8 to 0.2.9.
- [Release notes](https://github.com/mcgoo/vcpkg-rs/releases )
- [Changelog](https://github.com/mcgoo/vcpkg-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mcgoo/vcpkg-rs/compare/vcpkg-rs-0.2.8...vcpkg-rs-0.2.9 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-06-01 08:50:55 +01:00
dependabot-preview[bot]
57f477efa1
build(deps): bump syn from 1.0.28 to 1.0.29
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.28 to 1.0.29.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.28...1.0.29 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-31 17:46:29 +01:00
dependabot-preview[bot]
8a08ea466a
build(deps): bump serde_derive from 1.0.110 to 1.0.111
...
Bumps [serde_derive](https://github.com/serde-rs/serde ) from 1.0.110 to 1.0.111.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.110...v1.0.111 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-31 17:46:02 +01:00
dependabot-preview[bot]
b8ae30d454
build(deps): bump serde from 1.0.110 to 1.0.111
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.110 to 1.0.111.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.110...v1.0.111 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-31 17:45:42 +01:00
dependabot-preview[bot]
0a0fb2468a
build(deps): bump syn from 1.0.27 to 1.0.28
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.27 to 1.0.28.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.27...1.0.28 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-30 00:51:13 +02:00
dependabot-preview[bot]
bc2921b22c
build(deps): bump regex from 1.3.8 to 1.3.9
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.3.8 to 1.3.9.
- [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/1.3.8...1.3.9 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-29 08:17:07 +01:00
dependabot-preview[bot]
917ad53024
build(deps): bump regex from 1.3.7 to 1.3.8
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.3.7 to 1.3.8.
- [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-1.3.7...1.3.8 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-28 17:07:31 +01:00
dependabot-preview[bot]
aac87196d6
build(deps): bump vm-memory from 0.2.0 to 0.2.1
...
Bumps [vm-memory](https://github.com/rust-vmm/vm-memory ) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/rust-vmm/vm-memory/releases )
- [Changelog](https://github.com/rust-vmm/vm-memory/blob/v0.2.1/CHANGELOG.md )
- [Commits](https://github.com/rust-vmm/vm-memory/compare/v0.2.0...v0.2.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-28 17:06:48 +01:00
Rob Bradford
4c2e6054c0
build: Update to latest version of container
...
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-27 19:32:12 +02:00
Rob Bradford
c471ae944c
Dockerfile: Update to latest Rust toolchain: 1.43.0
...
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-27 19:32:12 +02:00
Rob Bradford
c31ad72ee9
build: Address issues found by 1.43.0 clippy
...
These are mostly due to use of "bare use" statements and unnecessary vector
creation.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-27 19:32:12 +02:00
Bo Chen
fbd1a6c5f1
vmm: api: Return complete error responses in handle_http_request()
...
Instead of responding only headers with error code, we now return
complete error responses to HTTP requests with errors (e.g. undefined
endpoints and InternalSeverError).
Fixes : #472
Signed-off-by: Bo Chen <chen.bo@intel.com >
2020-05-27 18:29:52 +01:00
Rob Bradford
0728bece0c
vmm: seccomp: Ensure that umask() can be reprogrammed
...
When doing self spawning the child will attempt to set the umask() again. Let
it through the seccomp rules so long as it the safe mask again.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-27 16:46:51 +01:00
Rob Bradford
3497eeff49
main: Set the umask to 0077
...
This ensures that all created filed are only read/write for the current user.
Fixes : #1240
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-27 16:46:51 +01:00
dependabot-preview[bot]
c1d15de7fc
build(deps): bump syn from 1.0.25 to 1.0.27
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.25 to 1.0.27.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.25...1.0.27 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-27 09:02:38 +02:00
dependabot-preview[bot]
a4bb96d45c
build(deps): bump libc from 0.2.70 to 0.2.71
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.70 to 0.2.71.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.70...0.2.71 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-27 09:02:13 +02:00
dependabot-preview[bot]
bfd52ad85f
build(deps): bump linux-loader from bd01b6d to 1af92d2
...
Bumps [linux-loader](https://github.com/rust-vmm/linux-loader ) from `bd01b6d` to `1af92d2`.
- [Release notes](https://github.com/rust-vmm/linux-loader/releases )
- [Commits](https://github.com/rust-vmm/linux-loader/compare/bd01b6dd2331950d5d059790291a7166c3ef57f3...1af92d21adfab105e05146625d7dace58892612d )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-27 09:01:24 +02:00
Michael Zhao
8f1f9d9e6b
devices: Implement InterruptController on AArch64
...
This commit only implements the InterruptController crate on AArch64.
The device specific part for GIC is to be added.
Signed-off-by: Michael Zhao <michael.zhao@arm.com >
2020-05-26 11:09:19 +02:00
Michael Zhao
b32d3025f3
devices: Refactor IOAPIC to cover other architectures
...
IOAPIC, a X86 specific interrupt controller, is referenced by device
manager and CPU manager. To work with more architectures, a common
type for all architectures is needed.
This commit introduces trait InterruptController to provide architecture
agnostic functions. Device manager and CPU manager can use it without
caring what the underlying device is.
Signed-off-by: Michael Zhao <michael.zhao@arm.com >
2020-05-26 11:09:19 +02:00
dependabot-preview[bot]
d588418053
build(deps): bump syn from 1.0.24 to 1.0.25
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.24 to 1.0.25.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.24...1.0.25 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-26 06:36:22 +02:00
dependabot-preview[bot]
83c18de56a
build(deps): bump proc-macro-hack from 0.5.15 to 0.5.16
...
Bumps [proc-macro-hack](https://github.com/dtolnay/proc-macro-hack ) from 0.5.15 to 0.5.16.
- [Release notes](https://github.com/dtolnay/proc-macro-hack/releases )
- [Commits](https://github.com/dtolnay/proc-macro-hack/compare/0.5.15...0.5.16 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-25 10:14:07 +02:00
dependabot-preview[bot]
7708b95ec7
build(deps): bump syn from 1.0.23 to 1.0.24
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.23 to 1.0.24.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.23...1.0.24 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-25 07:18:56 +02:00
dependabot-preview[bot]
749f2f0314
build(deps): bump proc-macro2 from 1.0.15 to 1.0.17
...
Bumps [proc-macro2](https://github.com/alexcrichton/proc-macro2 ) from 1.0.15 to 1.0.17.
- [Release notes](https://github.com/alexcrichton/proc-macro2/releases )
- [Commits](https://github.com/alexcrichton/proc-macro2/compare/1.0.15...1.0.17 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-25 07:17:38 +02:00
dependabot-preview[bot]
c98d6fd035
build(deps): bump openssl-sys from 0.9.56 to 0.9.57
...
Bumps [openssl-sys](https://github.com/sfackler/rust-openssl ) from 0.9.56 to 0.9.57.
- [Release notes](https://github.com/sfackler/rust-openssl/releases )
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-sys-v0.9.56...openssl-sys-v0.9.57 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-25 07:17:03 +02:00
dependabot-preview[bot]
a9ca493b5d
build(deps): bump proc-macro2 from 1.0.14 to 1.0.15
...
Bumps [proc-macro2](https://github.com/alexcrichton/proc-macro2 ) from 1.0.14 to 1.0.15.
- [Release notes](https://github.com/alexcrichton/proc-macro2/releases )
- [Commits](https://github.com/alexcrichton/proc-macro2/compare/1.0.14...1.0.15 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-22 22:23:31 +01:00
dependabot-preview[bot]
974c71389c
build(deps): bump thiserror from 1.0.18 to 1.0.19
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.18 to 1.0.19.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.18...1.0.19 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-22 17:26:44 +01:00
dependabot-preview[bot]
321c479b03
build(deps): bump proc-macro2 from 1.0.13 to 1.0.14
...
Bumps [proc-macro2](https://github.com/alexcrichton/proc-macro2 ) from 1.0.13 to 1.0.14.
- [Release notes](https://github.com/alexcrichton/proc-macro2/releases )
- [Commits](https://github.com/alexcrichton/proc-macro2/compare/1.0.13...1.0.14 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-22 17:26:39 +01:00
Michael Zhao
4f5c8be38e
build: Added a workflow to cross-build targetting AArch64
...
The result of the workflow can be seen in Checks tab of a PR.
Two targets have been added:
- stable aarch64-unknown-linux-gnu
- stable aarch64-unknown-linux-musl
Note: a temporary step was added before building. We used "sed" command
to remove "with-serde" feature of kvm-bindings in vmm/Cargo.toml.
This step should be removed in future when kvm-bindings is ready.
Signed-off-by: Michael Zhao <michael.zhao@arm.com >
2020-05-21 11:56:26 +01:00
Michael Zhao
1befae872d
build: Fixed build errors and warnings on AArch64
...
This is a preparing commit to build and test CH on AArch64. All building
issues were fixed, but no functionality was introduced.
For X86, the logic of code was not changed at all.
For ARM, the architecture specific part is still empty. And we applied
some tricks to workaround lint warnings. But such code will be replaced
later by other commits with real functionality.
Signed-off-by: Michael Zhao <michael.zhao@arm.com >
2020-05-21 11:56:26 +01:00
Michael Zhao
0090ec2dda
build: Updated development utilities for AArch64
...
Updated Dockerfile to work with multiple architectures.
Updated dev_cli.sh to:
1. Build container image before AArch64 image is ready in public.
2. Adjust default feature collection on AArch64.
3. Workaround a build problem with musl on AArch64.
Signed-off-by: Michael Zhao <michael.zhao@arm.com >
2020-05-21 11:56:26 +01:00
Rob Bradford
af8292b623
vmm, config, vhost_user_blk: remove "wce" parameter
...
This config option provided very little value and instead we now enable
this feature (which then lets the guest control the cache mode)
unconditionally.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-21 08:40:43 +02:00
Rob Bradford
9101bdd7a9
vm-virtio: block: Ensure backing file consistency
...
Correctly implement the virtio specification by setting the writeback
field on the request based on the algorithm in the spec.
TEST=Boot with hypervisor-firmware with CH in verbose mode. See info
level messages saying cache mode is writethrough in firmware (no support
for flush or WCE). Once in the Linux kernel see messages that mode is
writeback.
Fixes : #1216
Fixes : #680
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-21 08:40:43 +02:00
Rob Bradford
dc66eee8f0
vhost_user_block: Ensure backing file consistency
...
Correctly implement the virtio specification by setting the writeback
field on the request based on the algorithm in the spec.
TEST=Boot with hypervisor-firmware with CH in verbose mode. See info
level messages saying cache mode is writethrough in firmware (no support
for flush or WCE). Once in the Linux kernel see messages that mode is
writeback.
Fixes : #1216
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-21 08:40:43 +02:00
Rob Bradford
10db2131bd
vm-virtio: block: Add "writeback" control to Request
...
When this is set to false the write needs to be followed by a flush on
the underlying disk (leading to a fsync()).
The default behaviour is not changed with this change.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-21 08:40:43 +02:00
Rob Bradford
b94d9a30d3
vhost_user_backend: Allow backends to know features that can be used
...
Previous to adding a a trait method to inform the backends of the acked
features backends can use features than the guest has not enabled which
could lead to unpredictable results.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-21 08:40:43 +02:00
Rob Bradford
9d88ba7afb
vhost_user_block: Use VirtioBlockConfig from vm-virtio
...
Use the same definition of the struct as vm-virtio.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-21 08:40:43 +02:00
Rob Bradford
1fac263263
vm-virtio: Use config name as per spec
...
The spec calls this field "writeback" which is much clearer than than
"wce".
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-21 08:40:43 +02:00
dependabot-preview[bot]
077a5c367c
build(deps): bump syn from 1.0.22 to 1.0.23
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.22 to 1.0.23.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.22...1.0.23 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-21 07:05:20 +01:00
Rob Bradford
a813b57f59
vm-virtio, vhost_user_{fs,block,backend}: Move EVENT_IDX handling
...
Move the method that is used to decide whether the guest should be
signalled into the Queue implementation from vm-virtio. This removes
duplicated code between vhost_user_backend and the vm-virtio block
implementation.
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-20 12:56:25 +02:00
Rob Bradford
8ae7a38da5
build: Use same virtio-bindings version
...
Consistently use the crates.io 0.1.0 version based on Linux 5.0.0
Fixes : #1192
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-20 12:55:59 +02:00
Rob Bradford
3947809c36
vm-virtio: block: Ensure that VIRTIO_BLK_T_FLUSH requests actually sync
...
The implementation of this virtio block (and vhost-user block) command
called a function that was a no-op on Linux. Use the same function as
virtio-pmem to ensure that data is not lost when the guest asks for it
to be flused to disk.
Fixes : #399
Signed-off-by: Rob Bradford <robert.bradford@intel.com >
2020-05-20 12:54:10 +02:00
dependabot-preview[bot]
ca6edafbfe
build(deps): bump cc from 1.0.53 to 1.0.54
...
Bumps [cc](https://github.com/alexcrichton/cc-rs ) from 1.0.53 to 1.0.54.
- [Release notes](https://github.com/alexcrichton/cc-rs/releases )
- [Commits](https://github.com/alexcrichton/cc-rs/compare/1.0.53...1.0.54 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
2020-05-20 07:42:00 +02:00