Commit Graph

2538 Commits

Author SHA1 Message Date
dependabot-preview[bot]
f02a5d0915 build(deps): bump libz-sys from 1.0.27 to 1.1.0
Bumps [libz-sys](https://github.com/rust-lang/libz-sys) from 1.0.27 to 1.1.0.
- [Release notes](https://github.com/rust-lang/libz-sys/releases)
- [Commits](https://github.com/rust-lang/libz-sys/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-18 05:55:31 +00:00
Bo Chen
aaa02a0d78 virtio-devices: seccomp: Add 'brk' syscall to all worker threads
To prevent potential failures, this patch adds 'brk' syscall to all
virtio-devices worker threads.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-17 21:08:49 +02:00
Bo Chen
c90a71e329 virtio-devices: seccomp: Add 'brk' syscall to the rng thread
From the experiments of running integration tests on my local machine,
auditd occationally reported the 'brk' syscall is needed for the
'virtio-rng' worker thread.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-17 21:08:49 +02:00
Bo Chen
c70ad27247 virtio-devices: Add seccomp filter list for net worker thread
This patch adds the seccomp filter list for the virtio_net thread, while
the list was already added for the virtio_net_ctl thread.

Partially fixes: #925

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-17 21:08:49 +02:00
Bo Chen
3d6d9ca4de virtio-devices: Print out error message from the net worker thread
Partially fixes: #1551

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-17 21:08:49 +02:00
Bo Chen
1bf7817c40 virtio-devices: seccomp: Distinguish viritio-net-ctl from virtio-net
The current seccomp filter for virtio-net is actually for the worker
thread 'virtio_net_ctl' (not the actual worker thread
'virtio_net'). This patch introduces changes to distinguish those two
worker threads and seccomp filters.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-17 21:08:49 +02:00
Bo Chen
4539236690 virtio-devices: seccomp: Add seccomp filters for iommu thread
This patch enables the seccomp filters for the iommu worker thread.

Partially fixes: #925

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-17 21:08:49 +02:00
Bo Chen
dc6c62af09 virtio-devices: Print out error message from the iommu worker thread
Partially fixes: #1551

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-08-17 21:08:49 +02:00
dependabot-preview[bot]
d71142277c build(deps): bump libz-sys from 1.0.25 to 1.0.27
Bumps [libz-sys](https://github.com/rust-lang/libz-sys) from 1.0.25 to 1.0.27.
- [Release notes](https://github.com/rust-lang/libz-sys/releases)
- [Commits](https://github.com/rust-lang/libz-sys/compare/1.0.25...1.0.27)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-17 07:14:15 +00:00
Sebastien Boeuf
17a0733527 Jenkinsfile: Don't retry integration tests on failure
We recently added the ability for the gnu and musl workers to retry if
integration test were not passing, relying on some simple Jenkins
options. Unfortunately, this is not working as expected as the retries
never pass either. The suspected reason is the machine itself, which
might be scheduled on some specific hardware, which makes our VMs more
error prone.

Bottom line, on a faulty machine, the tests will always fail, therefore
there is no added value in retrying on the same machine.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-14 16:44:35 +02:00
Anatol Belski
eba42c392f devices: acpi: Add UID to devices with common HID
Some OS might check for duplicates and bail out, if it can't create a
distinct mapping. According to ACPI 5.0 section 6.1.12, while _UID is
optional, it becomes required when there are multiple devices with the
same _HID.

Signed-off-by: Anatol Belski <ab@php.net>
2020-08-14 08:52:02 +02:00
dependabot-preview[bot]
ebe61de0d1 build(deps): bump clap from 2.33.2 to 2.33.3
Bumps [clap](https://github.com/clap-rs/clap) from 2.33.2 to 2.33.3.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-14 06:18:55 +00:00
Rob Bradford
01b1412914 Jenkinsfile: Move OpenAPI validation to worker
Remove this work from the Jenkins master.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:53:16 +01:00
Rob Bradford
cf1a1ac6cf Jenkinsfile: Stop running "cargo" checks on master
These checks are now handled via GitHub actions.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:09:24 +02:00
Rob Bradford
bf4051665c build: Run cargo-audit from a GitHub action
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:09:24 +02:00
Rob Bradford
6b40f2dbc5 virtio-devices: vsock: Fix clippy error
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:09:24 +02:00
Rob Bradford
1a01f2d82a qcow: raw_file: Fix clippy warning
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:09:24 +02:00
Rob Bradford
a4b67c2226 build: Use GitHub actions for clippy/build/rustfmt tests
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 16:09:24 +02:00
Sebastien Boeuf
aa57762c4f virtio-devices: Acknowledge a device being paused
Using the Rust Barrier mechanism, this patch forces each virtio device
to acknowledge they've been correctly paused before going further.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-13 14:52:18 +02:00
Rob Bradford
fd48779a0d tests: Port test_initramfs to new methodology
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 13:03:22 +02:00
Rob Bradford
dd39aedde1 tests: Port test_memory_mergeable to new methodology
As a compromise we only print out the first child's output.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 13:03:22 +02:00
Rob Bradford
9dd4625fb4 tests: Port test_virtio_vsock to new methodology
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 13:03:22 +02:00
Rob Bradford
4983e5c322 tests: Port test_virtio_pmem to new methodology
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 13:03:22 +02:00
Rob Bradford
7b621bde4f Jenkinsfile: chown the workspace before cleaning up
If the build was aborted then the dev_cli.sh code that is responsible
for changing the file ownership will not get run. This results in the
failure to delete some of the files in the workspace.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-13 09:10:46 +01:00
dependabot-preview[bot]
b9fbcd469c build(deps): bump linux-loader from b13674a to 726360b
Bumps [linux-loader](https://github.com/rust-vmm/linux-loader) from `b13674a` to `726360b`.
- [Release notes](https://github.com/rust-vmm/linux-loader/releases)
- [Commits](b13674ab87...726360bb2c)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 16:29:45 +00:00
Sebastien Boeuf
fca46fd00e virtio-devices: net: Add dup syscall to seccomp filters
The seccomp filters specific to the virtio-net threads must contain
dup() syscall now that we ported the epoll code to the EpollHelper.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-12 17:34:02 +02:00
Sebastien Boeuf
a502cb282e virtio-devices: net_ctrlq: Port to EpollHelper
Migrate virtio-net and vhost-user-net control queue to EpollHelper so
as to remove code duplication.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-12 17:34:02 +02:00
Rob Bradford
32b70e354c tests: Port virtiofs tests to new methodology
This required a bit of rearranging as it is not possible to call
prepare_daemon() inside a catch_unwind{} block.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-12 14:53:02 +01:00
Rob Bradford
23174800ca tests: Port vhost_user_block tests to new methodology
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-12 14:53:02 +01:00
Rob Bradford
8f4e1382a9 tests: Port vhost_user_net tests to new methodology
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-12 14:53:02 +01:00
Rob Bradford
effff460d4 tests: Port test_cpu_topology to new test methodology
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-12 14:53:02 +01:00
Sebastien Boeuf
821cf3add9 virtio-devices: vhost-user: Port to EpollHelper
Migrate all vhost-user devices to EpollHelper so as to remove code that
is duplicated between multiple virtio devices.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-12 14:39:54 +02:00
Rob Bradford
d749aa2e6b tests: Port test_vfio to new test methodology
Now the testing aspects are run inside a panic handler block rather than
inside a credibility TestBlock. If the test fails then the output from
the cloud-hypervisor binary is then presented.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-12 12:19:34 +02:00
Rob Bradford
4ef702ea76 tests: Use a disk image for test_vfio rather than virtio-fs
This reduces the complexity of the test slightly. The PCI BDFs in the L1
needed changing as the block devices come before the network ones.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-12 12:19:34 +02:00
Sebastien Boeuf
8fbc4b4004 virtio-devices: vsock: Port to EpollHelper
Migrate to EpollHelper so as to remove code that is duplicated between
multiple virtio devices.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-12 10:07:57 +01:00
Sebastien Boeuf
01e7bd7276 virtio-devices: Make EpollHandler more generic
Instead of passing only the event type through the handle_event()
callback, we make the trait slightly more generic by providing the
epoll event to each virtio device implementation.

This is particularly useful for vsock as it will need the event set.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-12 10:07:57 +01:00
dependabot-preview[bot]
1e0b516a84 build(deps): bump linux-loader from b309c9d to b13674a
Bumps [linux-loader](https://github.com/rust-vmm/linux-loader) from `b309c9d` to `b13674a`.
- [Release notes](https://github.com/rust-vmm/linux-loader/releases)
- [Commits](b309c9df17...b13674ab87)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 07:52:10 +00:00
dependabot-preview[bot]
31031b43b6 build(deps): bump smallvec from 1.4.1 to 1.4.2
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.4.1...v1.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-12 06:41:42 +00:00
Sebastien Boeuf
e7ed037351 virtio-devices: balloon: Port to EpollHelper
Migrate to EpollHelper so as to remove code that is duplicated between
multiple virtio devices.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-11 19:58:10 +01:00
Alyssa Ross
17ad86afe3 docs: use shared memory with vhost-user
Not doing this is an error.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
2020-08-11 19:37:31 +02:00
Sebastien Boeuf
e8f0bdb6f2 virtio-devices: console: Add dup syscall to seccomp filters
The seccomp filters specific to the virtio-console thread must contain
dup syscall now that we ported the epoll code to the EpollHelper.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-11 19:17:50 +02:00
Sebastien Boeuf
d9992b5b5f virtio-devices: console: Port to EpollHelper
Migrate to EpollHelper so as to remove code that is duplicated between
multiple virtio devices.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-11 19:17:50 +02:00
Sebastien Boeuf
bdef54ead6 vmm: Add brk syscall to the API thread
The brk syscall is not always called as the system might not need it.
But when it's needed from the API thread, this causes the thread to
terminate as it is not part of the authorized list of syscalls.

This should fix some sporadic failures on the CI with the musl build.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-08-11 15:04:21 +01:00
Alyssa Ross
cb96afaa2f vhost_user_net: don't claim to impl all features
Even if the vhost-user-net device did implement all currently-defined
features, it would be very short-sighted to use ::all(), because if a
new feature was defined later, the device would start claiming to
implement it even though it didn't.

More practically, claiming to implement all features breaks using QEMU
with the cloud-hypervisor vhost-user-net backend, because QEMU will
negotiate VHOST_USER_PROTOCOL_F_SLAVE_REQ, and then break when the
communication channel isn't actually set up.

I wasn't sure exactly which features the backend should claim to
implement, though.  Definitely MQ, and I'm fairly certain none of the
features I've ommitted are implemented.  But I'm not sure about
REPLY_ACK.  As far as I can tell it should be implemented entirely by
the vhost crate, with no cooperation required from the vhost-user-net
backend itself, so there should be no reason to let a frontend use it
if it wants to.  But despite this, neither vhost-user-fs nor
vhost-user-blk claims to implement it.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
2020-08-11 12:58:26 +02:00
Rob Bradford
070f47246c tests: Port test_snapshot_restore to new methodology
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-11 12:57:18 +02:00
Rob Bradford
6cd31e7a4d tests: Introduce new test methodology
Rather than using a credible TestBlock to capture the test assertions
instead use a catch_unwind block to catch the panic and turn
it into a Result<>.

If block panicked or the child binary had non-zero exit then, and only
then, print out the child output.

This results in a clearer test output with no interleaving.

Currently only test_counters is ported to this methodology to
demonstrate its use.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-11 12:57:18 +02:00
Rob Bradford
5da55f0f2e tests: Remove "--nocapture" from tests
`cargo test` runs every test in its own process and by default will
collect the output from the test and only print it if the test fails.
`--nocapture` instead prints any output from the test immediately and
does not collate it - this leads to interleaving.

`--nocapture` might be useful for local test debugging but is not
something that is helpful, and is instead unhelpful for our CI as a
whole.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-11 12:57:18 +02:00
dependabot-preview[bot]
bfacf50d90 build(deps): bump serde_derive from 1.0.114 to 1.0.115
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.114...v1.0.115)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-11 05:47:30 +00:00
dependabot-preview[bot]
6812a63fca build(deps): bump serde from 1.0.114 to 1.0.115
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.114 to 1.0.115.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.114...v1.0.115)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-11 05:14:51 +00:00
Rob Bradford
c5a03d5ad4 build: Remove job directory on ARM64 build
This prevents the builder from running out of disk space.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-08-10 14:55:50 +01:00