vhost-device/vhost-device-input
dependabot[bot] 5e74f370be build(deps): bump the non-rust-vmm group across 2 directories with 14 updates
Bumps the non-rust-vmm group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.40` | `4.5.42` |
| [rand](https://github.com/rust-random/rand) | `0.9.1` | `0.9.2` |
| [rstest](https://github.com/la10736/rstest) | `0.25.0` | `0.26.1` |
| [clap_mangen](https://github.com/clap-rs/clap) | `0.2.27` | `0.2.29` |
| [toml](https://github.com/toml-rs/toml) | `0.8.23` | `0.9.4` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.2.27` | `1.2.30` |
| [litrs](https://github.com/LukasKalbertodt/litrs) | `0.4.1` | `0.4.2` |
| redox_syscall | `0.5.13` | `0.5.17` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.140` | `1.0.142` |
| [winnow](https://github.com/winnow-rs/winnow) | `0.7.11` | `0.7.12` |

Bumps the non-rust-vmm group with 5 updates in the /staging directory:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.40` | `4.5.42` |
| [rand](https://github.com/rust-random/rand) | `0.9.1` | `0.9.2` |
| [rstest](https://github.com/la10736/rstest) | `0.25.0` | `0.26.1` |
| [rustix](https://github.com/bytecodealliance/rustix) | `1.0.7` | `1.0.8` |
| [winnow](https://github.com/winnow-rs/winnow) | `0.7.11` | `0.7.12` |



Updates `clap` from 4.5.40 to 4.5.42
- [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.5.40...clap_complete-v4.5.42)

Updates `rand` from 0.9.1 to 0.9.2
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.1...rand_core-0.9.2)

Updates `rstest` from 0.25.0 to 0.26.1
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.25.0...v0.26.1)

Updates `clap_mangen` from 0.2.27 to 0.2.29
- [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_mangen-v0.2.27...clap_mangen-v0.2.29)

Updates `toml` from 0.8.23 to 0.9.4
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.23...toml-v0.9.4)

Updates `cc` from 1.2.27 to 1.2.30
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.27...cc-v1.2.30)

Updates `clap_builder` from 4.5.40 to 4.5.42
- [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/v4.5.40...v4.5.42)

Updates `clap_derive` from 4.5.40 to 4.5.41
- [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/v4.5.40...v4.5.41)

Updates `litrs` from 0.4.1 to 0.4.2
- [Release notes](https://github.com/LukasKalbertodt/litrs/releases)
- [Changelog](https://github.com/LukasKalbertodt/litrs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/LukasKalbertodt/litrs/compare/v0.4.1...v0.4.2)

Updates `redox_syscall` from 0.5.13 to 0.5.17

Updates `rstest_macros` from 0.25.0 to 0.26.1
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.25.0...v0.26.1)

Updates `serde_json` from 1.0.140 to 1.0.142
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.140...v1.0.142)

Updates `winnow` from 0.7.11 to 0.7.12
- [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/winnow-rs/winnow/compare/v0.7.11...v0.7.12)

Updates `clap` from 4.5.40 to 4.5.42
- [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.5.40...clap_complete-v4.5.42)

Updates `rand` from 0.9.1 to 0.9.2
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.1...rand_core-0.9.2)

Updates `rstest` from 0.25.0 to 0.26.1
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.25.0...v0.26.1)

Updates `clap_builder` from 4.5.40 to 4.5.42
- [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/v4.5.40...v4.5.42)

Updates `clap_derive` from 4.5.40 to 4.5.41
- [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/v4.5.40...v4.5.41)

Updates `rstest_macros` from 0.25.0 to 0.26.1
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/v0.25.0...v0.26.1)

Updates `rustix` from 1.0.7 to 1.0.8
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGES.md)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v1.0.7...v1.0.8)

Updates `winnow` from 0.7.11 to 0.7.12
- [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md)
- [Commits](https://github.com/winnow-rs/winnow/compare/v0.7.11...v0.7.12)

---
updated-dependencies:
- dependency-name: clap
  dependency-version: 4.5.42
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: rand
  dependency-version: 0.9.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: rstest
  dependency-version: 0.26.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: clap_mangen
  dependency-version: 0.2.29
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: toml
  dependency-version: 0.9.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: cc
  dependency-version: 1.2.30
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: clap_builder
  dependency-version: 4.5.42
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: clap_derive
  dependency-version: 4.5.41
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: litrs
  dependency-version: 0.4.2
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: redox_syscall
  dependency-version: 0.5.17
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: rstest_macros
  dependency-version: 0.26.1
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: serde_json
  dependency-version: 1.0.142
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: winnow
  dependency-version: 0.7.12
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: clap
  dependency-version: 4.5.42
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: rand
  dependency-version: 0.9.2
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: rstest
  dependency-version: 0.26.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: clap_builder
  dependency-version: 4.5.42
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: clap_derive
  dependency-version: 4.5.41
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: rstest_macros
  dependency-version: 0.26.1
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: rustix
  dependency-version: 1.0.8
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: winnow
  dependency-version: 0.7.12
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 13:19:56 +02:00
..
src input: run clippy --fix 2025-07-18 10:05:07 +02:00
Cargo.toml build(deps): bump the non-rust-vmm group across 2 directories with 14 updates 2025-08-01 13:19:56 +02:00
CHANGELOG.md vhost-device-input: prepare release v0.1.0 2024-11-21 16:08:37 +01:00
LICENSE-APACHE input: Initial support for input emulation 2023-12-07 17:35:26 +02:00
LICENSE-BSD-3-Clause input: Initial support for input emulation 2023-12-07 17:35:26 +02:00
README.md input: fix two minor typos 2025-07-07 11:28:02 +03:00

vhost-device-input

Synopsis

vhost-device-input --socket-path <SOCKET_PATH> --event-list <EVENT_LIST>

Description

This program is a vhost-user backend that emulates a VirtIO input event. It polls on a host's input event device (/dev/input/eventX) and passes the input event data to guests.

This program is tested with QEMU's vhost-user-input-pci. The implementation is based on the vhost-user protocol and as such should be interoperable with other virtual machine managers. Please see below for working examples.

Options

    -h, --help
        Print help.

    -s, --socket-path <SOCKET_PATH>
        Location of vhost-user Unix domain sockets, this path will be suffixed with
        0,1,2..event_count-1.

    -e, --event-list <EVENT_LIST>
        Input event device list in the format: event_device1,event_device2,...
        Example: --event-list /dev/input/event14,/dev/input/event15

Examples

The daemon should be started first:

host# vhost-device-input --socket-path /some/path/input.sock    \
      --event-list /dev/input/event14,/dev/input/event15

Note that from the above command the socket path "/some/path/input.sock0" and "/some/path/input.sock1" will be created for input events "event14" and "event15" respectively. This in turn needs to be communicated as chardev sockets to QEMU in order for the backend daemon and access the Virtio queues with the guest over the shared memory.

host# qemu-system -M virt                                                   \
      -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
      -chardev socket,path=/some/path/input.sock0,id=kbd0                   \
      -device vhost-user-input-pci,chardev=kdb0                             \
      -chardev socket,path=/some/path/input.sock1,id=mouse0                 \
      -device vhost-user-input-pci,chardev=mouse0                           \
      -numa node,memdev=mem                                                 \
      ...

License

This project is licensed under either of