virtio-input mouse

From: Vasily Postnicov <shamaz.mazum_at_gmail.com>
Date: Wed, 08 Oct 2025 07:09:26 UTC
Is it possible to have mouse emulation using virtio-input in bhyve?

My FreeBSD version is 14.3-RELEASE-p3, UEFI bootrom from
edk2-bhyve-g202308_5 and the guest is Ubuntu Linux.

My mouse device seems to be /dev/input/event6 (I guess. I checked this
using cat /dev/input/event6 and moving my mouse).

I start bhyve as follows:
bhyve -c 2 -m 8G -w -H \
           -s 0,hostbridge -s 3,virtio-blk,/dev/zvol/mypool/virtual/ubuntu2
\
           -s 5,virtio-net,tap0 -s 6,virtio-input,/dev/input/event6 \
           -s 29,fbuf,tcp=127.0.0.1:5900,w=1920,h=1080 \
           -s 31,lpc -l com1,stdio -l bootrom,BHYVE_UEFI.fd ubuntu

and use wlvncc to connect to the VNC server. This way the mouse pointer
stops moving in the host system and there is no mouse in the guest.

When I use -s 30,xhci,tablet my mouse works, but I wonder if I can use
virtio-input instead.