Go to file
dependabot[bot] cdc826ecfc build(deps): bump the vhost-device group with 22 updates
Bumps the vhost-device group with 22 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.4.3` | `4.4.6` |
| [libc](https://github.com/rust-lang/libc) | `0.2.147` | `0.2.148` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.47` | `1.0.49` |
| [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) | `0.11.1` | `0.11.2` |
| [itertools](https://github.com/rust-itertools/itertools) | `0.10.5` | `0.11.0` |
| [byteorder](https://github.com/BurntSushi/byteorder) | `1.4.3` | `1.5.0` |
| [anstyle](https://github.com/rust-cli/anstyle) | `1.0.1` | `1.0.4` |
| [anstyle-parse](https://github.com/rust-cli/anstyle) | `0.2.1` | `0.2.2` |
| [clap_lex](https://github.com/clap-rs/clap) | `0.5.0` | `0.5.1` |
| [fastrand](https://github.com/smol-rs/fastrand) | `2.0.0` | `2.0.1` |
| [hashbrown](https://github.com/rust-lang/hashbrown) | `0.14.0` | `0.14.1` |
| [indexmap](https://github.com/bluss/indexmap) | `2.0.0` | `2.0.2` |
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | `0.4.5` | `0.4.8` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.66` | `1.0.68` |
| [regex](https://github.com/rust-lang/regex) | `1.9.4` | `1.9.6` |
| [rustix](https://github.com/bytecodealliance/rustix) | `0.38.8` | `0.38.17` |
| [termcolor](https://github.com/BurntSushi/termcolor) | `1.2.0` | `1.3.0` |
| [toml_edit](https://github.com/toml-rs/toml) | `0.19.14` | `0.19.15` |
| [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.11` | `1.0.12` |
| [which](https://github.com/harryfei/which-rs) | `4.4.0` | `4.4.2` |
| [winapi-util](https://github.com/BurntSushi/winapi-util) | `0.1.5` | `0.1.6` |
| [winnow](https://github.com/winnow-rs/winnow) | `0.5.15` | `0.5.16` |


Updates `clap` from 4.4.3 to 4.4.6
- [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/compare/clap_complete-v4.4.3...v4.4.6)

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

Updates `thiserror` from 1.0.47 to 1.0.49
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.47...1.0.49)

Updates `vmm-sys-util` from 0.11.1 to 0.11.2
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Changelog](https://github.com/rust-vmm/vmm-sys-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/vmm-sys-util/commits)

Updates `itertools` from 0.10.5 to 0.11.0
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0)

Updates `byteorder` from 1.4.3 to 1.5.0
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.4.3...1.5.0)

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

Updates `anstyle-parse` from 0.2.1 to 0.2.2
- [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-parse-v0.2.1...anstyle-parse-v0.2.2)

Updates `clap_lex` from 0.5.0 to 0.5.1
- [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/compare/clap_lex-v0.5.0...clap_lex-v0.5.1)

Updates `fastrand` from 2.0.0 to 2.0.1
- [Release notes](https://github.com/smol-rs/fastrand/releases)
- [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/fastrand/compare/v2.0.0...v2.0.1)

Updates `hashbrown` from 0.14.0 to 0.14.1
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.14.0...v0.14.1)

Updates `indexmap` from 2.0.0 to 2.0.2
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/2.0.0...2.0.2)

Updates `linux-raw-sys` from 0.4.5 to 0.4.8
- [Commits](https://github.com/sunfishcode/linux-raw-sys/compare/v0.4.5...v0.4.8)

Updates `proc-macro2` from 1.0.66 to 1.0.68
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.66...1.0.68)

Updates `regex` from 1.9.4 to 1.9.6
- [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.9.4...1.9.6)

Updates `rustix` from 0.38.8 to 0.38.17
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.8...v0.38.17)

Updates `termcolor` from 1.2.0 to 1.3.0
- [Commits](https://github.com/BurntSushi/termcolor/compare/1.2.0...1.3.0)

Updates `toml_edit` from 0.19.14 to 0.19.15
- [Commits](https://github.com/toml-rs/toml/compare/v0.19.14...v0.19.15)

Updates `unicode-ident` from 1.0.11 to 1.0.12
- [Release notes](https://github.com/dtolnay/unicode-ident/releases)
- [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.11...1.0.12)

Updates `which` from 4.4.0 to 4.4.2
- [Changelog](https://github.com/harryfei/which-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/harryfei/which-rs/compare/4.4.0...4.4.2)

Updates `winapi-util` from 0.1.5 to 0.1.6
- [Commits](https://github.com/BurntSushi/winapi-util/compare/winapi-util-0.1.5...0.1.6)

Updates `winnow` from 0.5.15 to 0.5.16
- [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/winnow-rs/winnow/compare/v0.5.15...v0.5.16)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: vmm-sys-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: byteorder
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: anstyle
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: anstyle-parse
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: clap_lex
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: fastrand
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: hashbrown
  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: linux-raw-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: proc-macro2
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: regex
  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: termcolor
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: toml_edit
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: unicode-ident
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: which
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: winapi-util
  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>
2023-10-06 14:20:12 +05:30
.cargo Ignore advisory: RUSTSEC-2021-0145 2022-11-30 12:01:14 +05:30
.github dependabot: enable update grouping 2023-10-06 12:58:11 +05:30
crates build(deps): bump the vhost-device group with 22 updates 2023-10-06 14:20:12 +05:30
rust-vmm-ci@9751aaa0d0 build(deps): bump rust-vmm-ci from 665f31f to 9751aaa 2023-10-03 09:03:40 +05:30
.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 22 updates 2023-10-06 14:20:12 +05:30
Cargo.toml Prepend vhost-device- to crate directories 2023-09-26 18:57:55 +05:30
CODEOWNERS CODEOWNERS: add stefano-garzarella 2022-10-13 09:41:24 +02:00
coverage_config_x86_64.json tests: adjust code coverage after tool updates 2023-09-13 15:58:52 +01:00
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 Prepend vhost-device- to crate directories 2023-09-26 18:57:55 +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.

Here is the list of device backends that we support:

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.