3 QEMU vhost-user-input - Input emulation
4 =======================================
6 This document describes the setup and usage of the Virtio input device.
7 The Virtio input device is a paravirtualized device for input events.
12 The vhost-user-input device implementation was designed to work with a daemon
13 polling on input devices and passes input events to the guest.
15 QEMU provides a backend implementation in contrib/vhost-user-input.
20 Virtio input requires a guest Linux kernel built with the
21 ``CONFIG_VIRTIO_INPUT`` option.
26 The backend daemon should be started first:
30 host# vhost-user-input --socket-path=input.sock \
31 --evdev-path=/dev/input/event17
33 The QEMU invocation needs to create a chardev socket to communicate with the
34 backend daemon and access the VirtIO queues with the guest over the
35 :ref:`shared memory <shared_memory_object>`.
40 -chardev socket,path=/tmp/input.sock,id=mouse0 \
41 -device vhost-user-input-pci,chardev=mouse0 \
43 -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
44 -numa node,memdev=mem \