Go to file
dependabot[bot] 2858d65a2c build(deps): bump the vhost-device group in /staging with 6 updates
Bumps the vhost-device group in /staging with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [libc](https://github.com/rust-lang/libc) | `0.2.152` | `0.2.153` |
| [anstyle](https://github.com/rust-cli/anstyle) | `1.0.4` | `1.0.5` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.2.1` | `2.2.2` |
| [rustix](https://github.com/bytecodealliance/rustix) | `0.38.30` | `0.38.31` |
| [toml_edit](https://github.com/toml-rs/toml) | `0.21.0` | `0.21.1` |
| [winnow](https://github.com/winnow-rs/winnow) | `0.5.35` | `0.5.37` |


Updates `libc` from 0.2.152 to 0.2.153
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.152...0.2.153)

Updates `anstyle` from 1.0.4 to 1.0.5
- [Commits](https://github.com/rust-cli/anstyle/compare/v1.0.4...v1.0.5)

Updates `indexmap` from 2.2.1 to 2.2.2
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.2.1...2.2.2)

Updates `rustix` from 0.38.30 to 0.38.31
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.30...v0.38.31)

Updates `toml_edit` from 0.21.0 to 0.21.1
- [Commits](https://github.com/toml-rs/toml/compare/v0.21.0...v0.21.1)

Updates `winnow` from 0.5.35 to 0.5.37
- [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.35...v0.5.37)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: anstyle
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: indexmap
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: rustix
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: toml_edit
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: winnow
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-06 10:06:33 +02:00
.buildkite staging/tests: make the build blocking for CI 2023-12-04 10:56:28 +05:30
.cargo Ignore advisory: RUSTSEC-2021-0145 2022-11-30 12:01:14 +05:30
.github dependabot: run it also for staging crates 2023-11-14 11:21:49 +01:00
rust-vmm-ci@72ebeb393c build(deps): bump rust-vmm-ci from b31e811 to 72ebeb3 2024-01-15 13:13:37 +02:00
staging build(deps): bump the vhost-device group in /staging with 6 updates 2024-02-06 10:06:33 +02:00
vhost-device-gpio build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-i2c build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-input build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-rng build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-scmi build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-scsi build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-sound build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-template build(deps): bump the vhost-device group with 5 updates 2024-01-29 10:01:40 +01:00
vhost-device-vsock build(deps): bump the vhost-device group with 8 updates 2024-02-05 16:10:30 +01:00
.gitignore Add .gitignore 2021-08-19 09:52:14 +03:00
.gitmodules Initial commit 2021-05-26 10:18:40 +03:00
Cargo.lock build(deps): bump the vhost-device group with 8 updates 2024-02-05 16:10:30 +01:00
Cargo.toml sound: promote to main workspace 2024-01-03 11:16:07 +05:30
CODEOWNERS CODEOWNERS: add epilys, remove mathieupoirier 2023-11-02 09:29:07 +00:00
coverage_config_x86_64.json sound: promote to main workspace 2024-01-03 11:16:07 +05:30
LICENSE-APACHE Initial commit 2021-05-26 10:18:40 +03:00
LICENSE-BSD-3-Clause Add BSD-3-Clause license for the crates 2022-10-27 11:19:40 -06:00
README.md sound: promote to main workspace 2024-01-03 11:16:07 +05:30

vhost-device

Design

This repository hosts various 'vhost-user' device backends in their own crates. See their individual README.md files for specific information about those crates.

To be included here device backends must:

Here is the list of device backends that we support:

The vhost-device workspace also provides a template to help new developers understand how to write their own vhost-user backend.

Staging Devices

Implementing a proper VirtIO device requires co-ordination between the specification, drivers and backend implementations. As these can all be in flux during development it was decided introducing a staging workspace which would allow developers to work within the main rust-vmm project while clearly marking the backends as not production ready.

To be included in the staging workspace there must at least be:

  • A public proposal to extend the VIRTIO specification
  • A public implementation of a device driver
  • Documentation pointing to the above

More information may be found in its README file.

Here is the list of device backends in staging:

Testing and Code Coverage

Like the wider rust-vmm project we expect new features to come with comprehensive code coverage. However as a multi-binary repository there are cases where avoiding a drop in coverage can be hard and an exception to the approach is allowable. These are:

  • adding a new binary target (aim at least 60% overall coverage)
  • expanding the main function (a small drop is acceptable)

However any new feature added to an existing binary should not cause a drop in coverage. The general aim should be to always improve coverage.

Separation of Concerns

The binaries built by this repository can be run with any VMM which can act as a vhost-user frontend. Typically they have been tested with QEMU although the rust-vmm project does provide a vhost-user frontend crate for rust based VMMs.

While it's possible to implement all parts of the backend inside the vhost-device workspace consideration should be given to separating the VirtQueue handling and response logic to a crate in vm-virtio devices. This way a monolithic rust-vmm VMM implementation can reuse the core logic to service the virtio requests directly in the application.

Build dependency

The GPIO crate needs a local installation of libgpiod library to be available. If your distro ships libgpiod >= v2.0, then you should be fine.

Otherwise, you will need to build libgpiod yourself:

git clone --depth 1 --branch v2.0.x https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/
cd libgpiod
./autogen.sh --prefix="$PWD/install/"
make install

In order to inform tools about the build location, you can now set:

export PKG_CONFIG_PATH="<PATH-TO-LIBGPIOD>/install/lib/pkgconfig/"

To prevent setting this in every terminal session, you can also configure cargo to set it automatically.

Xen support

Supporting Xen requires special handling while mapping the guest memory. The vm-memory crate implements xen memory mapping support via a separate feature xen, and this crate uses the same feature name to enable Xen support.

It was decided by the rust-vmm maintainers to keep the interface simple and build the crate for either standard Unix memory mapping or Xen, and not both.