From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adla2-0004Fb-5Z for qemu-devel@nongnu.org; Wed, 09 Mar 2016 16:23:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adlZy-0003a9-5L for qemu-devel@nongnu.org; Wed, 09 Mar 2016 16:23:42 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adlZx-0003Zc-Uo for qemu-devel@nongnu.org; Wed, 09 Mar 2016 16:23:38 -0500 Received: by mail-wm0-x244.google.com with SMTP id l68so433949wml.3 for ; Wed, 09 Mar 2016 13:23:37 -0800 (PST) Sender: Paolo Bonzini References: <1457087116-4379-1-git-send-email-kraxel@redhat.com> From: Paolo Bonzini Message-ID: <56E09456.4020404@redhat.com> Date: Wed, 9 Mar 2016 22:23:34 +0100 MIME-Version: 1.0 In-Reply-To: <1457087116-4379-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/3] input: linux evdev support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org On 04/03/2016 11:25, Gerd Hoffmann wrote: > Hi, > > This patch series adds support for reading input events directly from > linux input devices instead of getting them from the UI (gtk/spice/...). > This is useful if you pci passthrough your vga, because you don't need > some otherwise dummy UI just to feed input into your guest. Chech the > patch #1 commit message for all the details. > > It's been a while I posted the patches last time. Undusted them. > Rebased to master. Adapted to some QAPI changes. Squashed in some > bugfixes accumulated over time. Applied some testing using my new > intel test box. This is nice! I have used virtio-input-host to do some pseudo-multiseat, but it was only for Linux guests. However, instead of adding a new -input-linux option, could you make it a QOM object which implements UserCreatable? Then you can add it with something like "-object input-linux,path=/dev/input/input10" (perhaps "input-evdev" would be more specific). This has three advantages: 1) you get hotplug for free; 2) you don't add yet another option to vl.c (btw patch 2 and 3 are not updating the docs); 3) it's easier to add more backends, though the only ones that come to mind are rather silly (e.g. input-msmouse could take a chardev and parse the serial mouse protocol). If you cannot use QOM, even just using "-inputdev [backend=]linux,path=/dev/input/input10" would provide (3), but QOM seems superior at the cost of a little more boilerplate in ui/input-linux.c. Thanks, Paolo