qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/3] input: linux evdev support
Date: Wed, 9 Mar 2016 22:23:34 +0100	[thread overview]
Message-ID: <56E09456.4020404@redhat.com> (raw)
In-Reply-To: <1457087116-4379-1-git-send-email-kraxel@redhat.com>



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

  parent reply	other threads:[~2016-03-09 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 10:25 [Qemu-devel] [PATCH 0/3] input: linux evdev support Gerd Hoffmann
2016-03-04 10:25 ` [Qemu-devel] [PATCH 1/3] " Gerd Hoffmann
2016-03-04 10:25 ` [Qemu-devel] [PATCH 2/3] input-linux: add option to toggle grab on all devices Gerd Hoffmann
2016-03-04 10:25 ` [Qemu-devel] [PATCH 3/3] input-linux: add switch to enable auto-repeat events Gerd Hoffmann
2016-03-09 21:23 ` Paolo Bonzini [this message]
2016-03-10  7:31   ` [Qemu-devel] [PATCH 0/3] input: linux evdev support Gerd Hoffmann
2016-03-10  9:50     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E09456.4020404@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).