vhost-device/vhost-device-input
dependabot[bot] e026097f5b build(deps): bump the vhost-device group across 1 directory with 26 updates
Bumps the vhost-device group with 22 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.9` | `4.5.13` |
| [env_logger](https://github.com/rust-cli/env_logger) | `0.11.3` | `0.11.5` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.10.1` | `3.12.0` |
| [num_enum](https://github.com/illicitonion/num_enum) | `0.7.2` | `0.7.3` |
| [bitflags](https://github.com/bitflags/bitflags) | `2.4.1` | `2.6.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.204` | `1.0.206` |
| [anstream](https://github.com/rust-cli/anstyle) | `0.6.14` | `0.6.15` |
| [anstyle](https://github.com/rust-cli/anstyle) | `1.0.7` | `1.0.8` |
| [anstyle-parse](https://github.com/rust-cli/anstyle) | `0.2.4` | `0.2.5` |
| [anstyle-query](https://github.com/rust-cli/anstyle) | `1.1.0` | `1.1.1` |
| [anstyle-wincon](https://github.com/rust-cli/anstyle) | `3.0.3` | `3.0.4` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.1.6` | `1.1.10` |
| [clap_lex](https://github.com/clap-rs/clap) | `0.7.1` | `0.7.2` |
| [colorchoice](https://github.com/rust-cli/anstyle) | `1.0.1` | `1.0.2` |
| [env_filter](https://github.com/rust-cli/env_logger) | `0.1.0` | `0.1.2` |
| [indexmap](https://github.com/indexmap-rs/indexmap) | `2.2.6` | `2.3.0` |
| [is_terminal_polyfill](https://github.com/polyfill-rs/is_terminal_polyfill) | `1.70.0` | `1.70.1` |
| [ppv-lite86](https://github.com/cryptocorrosion/cryptocorrosion) | `0.2.17` | `0.2.20` |
| [regex](https://github.com/rust-lang/regex) | `1.10.5` | `1.10.6` |
| [serde_spanned](https://github.com/toml-rs/toml) | `0.6.6` | `0.6.7` |
| [target-lexicon](https://github.com/bytecodealliance/target-lexicon) | `0.12.15` | `0.12.16` |
| [version_check](https://github.com/SergioBenitez/version_check) | `0.9.4` | `0.9.5` |



Updates `clap` from 4.5.9 to 4.5.13
- [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.9...clap_complete-v4.5.13)

Updates `env_logger` from 0.11.3 to 0.11.5
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.3...v0.11.5)

Updates `tempfile` from 3.10.1 to 3.12.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/commits)

Updates `num_enum` from 0.7.2 to 0.7.3
- [Commits](https://github.com/illicitonion/num_enum/compare/0.7.2...0.7.3)

Updates `bitflags` from 2.4.1 to 2.6.0
- [Release notes](https://github.com/bitflags/bitflags/releases)
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitflags/bitflags/compare/2.4.1...2.6.0)

Updates `serde` from 1.0.204 to 1.0.206
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.206)

Updates `anstream` from 0.6.14 to 0.6.15
- [Commits](https://github.com/rust-cli/anstyle/compare/anstream-v0.6.14...anstream-v0.6.15)

Updates `anstyle` from 1.0.7 to 1.0.8
- [Commits](https://github.com/rust-cli/anstyle/compare/v1.0.7...v1.0.8)

Updates `anstyle-parse` from 0.2.4 to 0.2.5
- [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-parse-v0.2.4...anstyle-parse-v0.2.5)

Updates `anstyle-query` from 1.1.0 to 1.1.1
- [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-query-v1.1.0...anstyle-query-v1.1.1)

Updates `anstyle-wincon` from 3.0.3 to 3.0.4
- [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-wincon-v3.0.3...anstyle-wincon-v3.0.4)

Updates `cc` from 1.1.6 to 1.1.10
- [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.1.6...cc-v1.1.10)

Updates `clap_builder` from 4.5.9 to 4.5.13
- [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.9...v4.5.13)

Updates `clap_derive` from 4.5.8 to 4.5.13
- [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.8...v4.5.13)

Updates `clap_lex` from 0.7.1 to 0.7.2
- [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.7.1...clap_lex-v0.7.2)

Updates `colorchoice` from 1.0.1 to 1.0.2
- [Commits](https://github.com/rust-cli/anstyle/compare/colorchoice-v1.0.1...colorchoice-v1.0.2)

Updates `env_filter` from 0.1.0 to 0.1.2
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/env_filter-v0.1.0...env_filter-v0.1.2)

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

Updates `is_terminal_polyfill` from 1.70.0 to 1.70.1
- [Changelog](https://github.com/polyfill-rs/is_terminal_polyfill/blob/main-v1.70/CHANGELOG.md)
- [Commits](https://github.com/polyfill-rs/is_terminal_polyfill/compare/v1.70.0...v1.70.1)

Updates `num_enum_derive` from 0.7.2 to 0.7.3
- [Commits](https://github.com/illicitonion/num_enum/compare/0.7.2...0.7.3)

Updates `ppv-lite86` from 0.2.17 to 0.2.20
- [Commits](https://github.com/cryptocorrosion/cryptocorrosion/commits)

Updates `regex` from 1.10.5 to 1.10.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.10.5...1.10.6)

Updates `serde_derive` from 1.0.204 to 1.0.206
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.206)

Updates `serde_spanned` from 0.6.6 to 0.6.7
- [Commits](https://github.com/toml-rs/toml/compare/serde_spanned-v0.6.6...serde_spanned-v0.6.7)

Updates `target-lexicon` from 0.12.15 to 0.12.16
- [Commits](https://github.com/bytecodealliance/target-lexicon/compare/v0.12.15...v0.12.16)

Updates `version_check` from 0.9.4 to 0.9.5
- [Commits](https://github.com/SergioBenitez/version_check/compare/v0.9.4...v0.9.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: num_enum
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: anstream
  dependency-type: indirect
  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: anstyle-parse
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: anstyle-query
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: anstyle-wincon
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: cc
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: clap_builder
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: clap_derive
  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: colorchoice
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: env_filter
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: indexmap
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: is_terminal_polyfill
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: num_enum_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: ppv-lite86
  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: serde_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: serde_spanned
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: target-lexicon
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: version_check
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 12:00:05 +05:30
..
src input: Add test cases 2023-12-07 17:35:26 +02:00
Cargo.toml build(deps): bump the vhost-device group across 1 directory with 26 updates 2024-08-12 12:00:05 +05:30
CHANGELOG.md chore: standardize changelogs 2024-07-24 19:37:19 +05:30
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: Initial support for input emulation 2023-12-07 17:35:26 +02: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 implemenation 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