Go to file
Manos Pitsidianakis 4ef66aae1e xtask: generate manpage for vhost-device-scmi
Add vhost-device-scmi support for the mangen task in xtask binary.

This generates a manpage in target/dist/man/vhost-device-scmi.1

The rendered ROFF output looks like:

  vhost-device-scmi(1)      General Commands Manual             vhost-device-scmi(1)

  NAME
         vhost-device-scmi - vhost-user SCMI backend device

  SYNOPSIS
         vhost-device-scmi <-s|--socket-path> [-d|--device] [--help-devices] [-h|--help] [-V|--version]

  DESCRIPTION
         vhost-user SCMI backend device

  OPTIONS
         -s, --socket-path=SOCKET_PATH
                vhost-user socket to use

         -d, --device=DEVICE
                Devices to expose

         --help-devices
                Print help on available devices

         -h, --help
                Print help

         -V, --version
                Print version

  VERSION
         v0.3.0

  REPORTING BUGS
         Report bugs to the project's issue tracker: https://github.com/rust-vmm/vhost-device

                  vhost-device-scmi 0.3.0                                vhost-device-scmi(1)

Fixes #697 ("Add man page for vhost-device-scmi")

Resolves: https://github.com/rust-vmm/vhost-device/issues/697
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
2025-04-15 14:25:32 +05:30
.buildkite CI: Exclude GPU from musl builds/tests 2025-02-14 10:15:52 +02:00
.cargo Add an xtask crate to generate manpages 2025-04-15 14:25:32 +05:30
.github dependabot: Group updates to reduce noise 2024-11-18 13:50:34 +05:30
rust-vmm-ci@c3ef897738 build(deps): bump rust-vmm-ci from 3ea2d3f to c3ef897 2025-04-03 14:07:42 +02:00
staging video: remove redundant .to_string() in log::debug 2025-04-03 14:07:42 +02:00
vhost-device-can clippy: Fix clippy::question_mark 2025-03-31 13:45:27 +02:00
vhost-device-console build(deps): bump the non-rust-vmm group across 2 directories with 46 updates 2025-04-03 11:41:01 +02:00
vhost-device-gpio clippy: Fix clippy::precedence 2025-03-31 13:45:27 +02:00
vhost-device-gpu build(deps): bump the non-rust-vmm group across 2 directories with 46 updates 2025-04-03 11:41:01 +02:00
vhost-device-i2c clippy: Fix clippy::precedence 2025-03-31 13:45:27 +02:00
vhost-device-input build(deps): bump the non-rust-vmm group across 2 directories with 46 updates 2025-04-03 11:41:01 +02:00
vhost-device-rng build(deps): bump the non-rust-vmm group across 2 directories with 46 updates 2025-04-03 11:41:01 +02:00
vhost-device-scmi scmi: move CLI arg types to lib submodule 2025-04-15 14:25:32 +05:30
vhost-device-scsi build(deps): bump the non-rust-vmm group across 2 directories with 46 updates 2025-04-03 11:41:01 +02:00
vhost-device-sound sound: move CLI arg types to lib submodule 2025-04-15 14:25:32 +05:30
vhost-device-spi build(deps): bump the non-rust-vmm group across 2 directories with 46 updates 2025-04-03 11:41:01 +02:00
vhost-device-template clippy: Fix clippy::precedence 2025-03-31 13:45:27 +02:00
vhost-device-vsock build(deps): bump the non-rust-vmm group across 2 directories with 46 updates 2025-04-03 11:41:01 +02:00
xtask xtask: generate manpage for vhost-device-scmi 2025-04-15 14:25:32 +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 Add an xtask crate to generate manpages 2025-04-15 14:25:32 +05:30
Cargo.toml Add an xtask crate to generate manpages 2025-04-15 14:25:32 +05:30
CODEOWNERS CODEOWNERS: add self as code owner of sound and gpu crate 2025-02-19 10:16:02 +05:30
coverage_config_x86_64.json Add an xtask crate to generate manpages 2025-04-15 14:25:32 +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 README.md: add vhost-device-gpu to staging list 2024-12-09 17:19:56 +02:00

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 device crate in the vm-virtio repository. 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.