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

| Package | From | To |
| --- | --- | --- |
| [libc](https://github.com/rust-lang/libc) | `0.2.158` | `0.2.159` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.12.0` | `3.13.0` |
| [autocfg](https://github.com/cuviper/autocfg) | `1.3.0` | `1.4.0` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.1.21` | `1.1.22` |
| [once_cell](https://github.com/matklad/once_cell) | `1.19.0` | `1.20.1` |
| [pkg-config](https://github.com/rust-lang/pkg-config-rs) | `0.3.30` | `0.3.31` |
| [regex](https://github.com/rust-lang/regex) | `1.10.6` | `1.11.0` |
| [regex-automata](https://github.com/rust-lang/regex) | `0.4.7` | `0.4.8` |
| [regex-syntax](https://github.com/rust-lang/regex) | `0.8.4` | `0.8.5` |
| [serde_spanned](https://github.com/toml-rs/toml) | `0.6.7` | `0.6.8` |


Updates `libc` from 0.2.158 to 0.2.159
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.159/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.158...0.2.159)

Updates `tempfile` from 3.12.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.12.0...v3.13.0)

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

Updates `cc` from 1.1.21 to 1.1.22
- [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.21...cc-v1.1.22)

Updates `once_cell` from 1.19.0 to 1.20.1
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/matklad/once_cell/compare/v1.19.0...v1.20.1)

Updates `pkg-config` from 0.3.30 to 0.3.31
- [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/pkg-config-rs/compare/0.3.30...0.3.31)

Updates `regex` from 1.10.6 to 1.11.0
- [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.6...1.11.0)

Updates `regex-automata` from 0.4.7 to 0.4.8
- [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/commits)

Updates `regex-syntax` from 0.8.4 to 0.8.5
- [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/commits)

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

---
updated-dependencies:
- dependency-name: libc
  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: 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: once_cell
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: pkg-config
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
- dependency-name: regex
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: vhost-device
- dependency-name: regex-automata
  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: serde_spanned
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: vhost-device
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-30 09:50:29 +02:00
..
src input: Add test cases 2023-12-07 17:35:26 +02:00
Cargo.toml build(deps): bump the vhost-device group with 10 updates 2024-09-30 09:50:29 +02:00
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