vhost-device/vhost-device-input
dependabot[bot] a7e356bf35 build(deps): bump the vhost-device group with 34 updates
Bumps the vhost-device group with 34 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.3` | `4.5.4` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.58` | `1.0.59` |
| [vhost-user-backend](https://github.com/rust-vmm/vhost) | `0.14.0` | `0.15.0` |
| [virtio-queue](https://github.com/rust-vmm/vm-virtio) | `0.11.0` | `0.12.0` |
| [rstest](https://github.com/la10736/rstest) | `0.18.2` | `0.19.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.197` | `1.0.198` |
| [allocator-api2](https://github.com/zakarumych/allocator-api2) | `0.2.16` | `0.2.18` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.81` | `1.0.82` |
| [autocfg](https://github.com/cuviper/autocfg) | `1.1.0` | `1.2.0` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.90` | `1.0.95` |
| [cfg-expr](https://github.com/EmbarkStudios/cfg-expr) | `0.15.7` | `0.15.8` |
| [clap_derive](https://github.com/clap-rs/clap) | `4.5.3` | `4.5.4` |
| [either](https://github.com/rayon-rs/either) | `1.10.0` | `1.11.0` |
| [encoding_rs](https://github.com/hsivonen/encoding_rs) | `0.8.33` | `0.8.34` |
| [getrandom](https://github.com/rust-random/getrandom) | `0.2.12` | `0.2.14` |
| [itoa](https://github.com/dtolnay/itoa) | `1.0.10` | `1.0.11` |
| [memchr](https://github.com/BurntSushi/memchr) | `2.7.1` | `2.7.2` |
| [pin-project-lite](https://github.com/taiki-e/pin-project-lite) | `0.2.13` | `0.2.14` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.79` | `1.0.81` |
| [quote](https://github.com/dtolnay/quote) | `1.0.35` | `1.0.36` |
| [regex-syntax](https://github.com/rust-lang/regex) | `0.8.2` | `0.8.3` |
| [rstest_macros](https://github.com/la10736/rstest) | `0.18.2` | `0.19.0` |
| [rustix](https://github.com/bytecodealliance/rustix) | `0.38.32` | `0.38.33` |
| [serde_derive](https://github.com/serde-rs/serde) | `1.0.197` | `1.0.198` |
| [strsim](https://github.com/rapidfuzz/strsim-rs) | `0.11.0` | `0.11.1` |
| [thiserror-impl](https://github.com/dtolnay/thiserror) | `1.0.58` | `1.0.59` |
| [windows-targets](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |
| [windows_aarch64_gnullvm](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |
| [windows_aarch64_msvc](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |
| [windows_i686_gnu](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |
| [windows_i686_msvc](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |
| [windows_x86_64_gnu](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |
| [windows_x86_64_gnullvm](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |
| [windows_x86_64_msvc](https://github.com/microsoft/windows-rs) | `0.52.4` | `0.52.5` |


Updates `clap` from 4.5.3 to 4.5.4
- [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.3...v4.5.4)

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

Updates `vhost-user-backend` from 0.14.0 to 0.15.0
- [Release notes](https://github.com/rust-vmm/vhost/releases)
- [Commits](https://github.com/rust-vmm/vhost/commits)

Updates `virtio-queue` from 0.11.0 to 0.12.0
- [Release notes](https://github.com/rust-vmm/vm-virtio/releases)
- [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.11.0...virtio-queue-v0.12.0)

Updates `rstest` from 0.18.2 to 0.19.0
- [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.18.2...v0.19.0)

Updates `serde` from 1.0.197 to 1.0.198
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198)

Updates `allocator-api2` from 0.2.16 to 0.2.18
- [Changelog](https://github.com/zakarumych/allocator-api2/blob/main/CHANGELOG.md)
- [Commits](https://github.com/zakarumych/allocator-api2/compare/v0.2.16...v0.2.18)

Updates `anyhow` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

Updates `autocfg` from 1.1.0 to 1.2.0
- [Commits](https://github.com/cuviper/autocfg/compare/1.1.0...1.2.0)

Updates `cc` from 1.0.90 to 1.0.95
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.90...1.0.95)

Updates `cfg-expr` from 0.15.7 to 0.15.8
- [Release notes](https://github.com/EmbarkStudios/cfg-expr/releases)
- [Changelog](https://github.com/EmbarkStudios/cfg-expr/blob/main/CHANGELOG.md)
- [Commits](https://github.com/EmbarkStudios/cfg-expr/compare/0.15.7...0.15.8)

Updates `clap_derive` from 4.5.3 to 4.5.4
- [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.3...v4.5.4)

Updates `either` from 1.10.0 to 1.11.0
- [Commits](https://github.com/rayon-rs/either/compare/1.10.0...1.11.0)

Updates `encoding_rs` from 0.8.33 to 0.8.34
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.33...v0.8.34)

Updates `getrandom` from 0.2.12 to 0.2.14
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.14)

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

Updates `memchr` from 2.7.1 to 2.7.2
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.1...2.7.2)

Updates `pin-project-lite` from 0.2.13 to 0.2.14
- [Release notes](https://github.com/taiki-e/pin-project-lite/releases)
- [Changelog](https://github.com/taiki-e/pin-project-lite/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/pin-project-lite/compare/v0.2.13...v0.2.14)

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

Updates `quote` from 1.0.35 to 1.0.36
- [Release notes](https://github.com/dtolnay/quote/releases)
- [Commits](https://github.com/dtolnay/quote/compare/1.0.35...1.0.36)

Updates `regex-syntax` from 0.8.2 to 0.8.3
- [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/regex-syntax-0.8.2...regex-syntax-0.8.3)

Updates `rstest_macros` from 0.18.2 to 0.19.0
- [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.18.2...v0.19.0)

Updates `rustix` from 0.38.32 to 0.38.33
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.32...v0.38.33)

Updates `serde_derive` from 1.0.197 to 1.0.198
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198)

Updates `strsim` from 0.11.0 to 0.11.1
- [Release notes](https://github.com/rapidfuzz/strsim-rs/releases)
- [Changelog](https://github.com/rapidfuzz/strsim-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rapidfuzz/strsim-rs/compare/v0.11.0...v0.11.1)

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

Updates `windows-targets` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `windows_aarch64_gnullvm` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `windows_aarch64_msvc` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `windows_i686_gnu` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `windows_i686_msvc` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `windows_x86_64_gnu` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `windows_x86_64_gnullvm` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `windows_x86_64_msvc` from 0.52.4 to 0.52.5
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

---
updated-dependencies:
- dependency-name: clap
  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: vhost-user-backend
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: virtio-queue
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: rstest
  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: allocator-api2
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: anyhow
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: autocfg
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: cc
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: cfg-expr
  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: either
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: encoding_rs
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: getrandom
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: itoa
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: memchr
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: pin-project-lite
  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: quote
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: regex-syntax
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: rstest_macros
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: rustix
  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: strsim
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: thiserror-impl
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows-targets
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows_aarch64_gnullvm
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows_aarch64_msvc
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows_i686_gnu
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows_i686_msvc
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows_x86_64_gnu
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows_x86_64_gnullvm
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: windows_x86_64_msvc
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-25 14:43:14 +05:30
..
src input: Add test cases 2023-12-07 17:35:26 +02:00
Cargo.toml build(deps): bump the vhost-device group with 34 updates 2024-04-25 14:43:14 +05:30
CHANGELOG.md input: Initial support for input emulation 2023-12-07 17:35:26 +02: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: 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