qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jiri 'Ghormoon' Novak <ghormoon@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "alex.williamson" <alex.williamson@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] virtio-input questions
Date: Mon, 16 Nov 2015 18:28:48 +0100	[thread overview]
Message-ID: <564A1250.3080908@gmail.com> (raw)
In-Reply-To: <1447694178.11547.84.camel@redhat.com>

Hi,

Gerd Hoffmann wrote:
>    Hi,
>
>>> Seems I'll try to start from the curses.c then, if that's better way
>>> (my knowledge of qemu codebase is zero and I'm not a good developer
>>> either, but I may try in my free time since I need this and I'd like
> I wouldn't bother with curses.  Better grab input events directly at the
> source, like virtio-input-host does.  Check out
> hw/input/virtio-input-host.c, or https://www.kraxel.org/cgit/input/
> (probably gives a better idea how to interpret the linux input layer
> events).
>
> Also note that hw/input/virtio-input-hid.c has a qcode -> linux mapping
> table, which should be usable to generate a reverse mapping.  You'll
> need that to feed linux keyboard events into the qemu input code.
Maybe I've formulated it bit wrong, the part I should be taking from 
curses was mainly about how to feed it to qemu input. I'll have to look 
into that a more in detail, I don't understand it much yet :)
>>> to see it upstream - there are more people trying vga passthrough who
>>> possibly need this :)) At least keyboard, mouse is nice to have, but
>>> that can be done with the virtio-input, it's not crucial eg. during
>>> installation where you may not have those drivers.
> If virtio-input works for the mouse it should work equally well for
> keyboard.  Guest drivers are upstream in kernel 4.1 & newer.  Fedora 22
> should work once you've updated the kernel (shipped with kernel 4.0.x,
> now at 4.2.x).  With the just released Fedora 23 virtio-input should
> even work on the install media (didn't test that yet though ...).
Well, but eg. for Debian, stable doesn't have the drivers yet. You need 
a backport kernel :) Or even worse - Windows guest which won't take it 
at all yet. Or maybe others. if you're booting something in the guest 
with vga and keyboard passthrough, there's still big chance you won't 
have the keyboard working. so that's the reason to use qemu input.
And for the windows - that's a quite common reason for vga passthrough - 
you have disposable gaming VM (running on LUKS+ZFS drive and it doesn't 
complain :P)
>>> I was just wondering if you don't have a bunch of testing VMs that
>>> you've already used for this to quickly rule out one side (host or
>>> guest).
> I'm using standard fedora install, without any special tweaks (other
> than a self-compiled kernel in the early days, but even that isn't
> needed any more).
> cheers,
>    Gerd
>
>

      reply	other threads:[~2015-11-16 17:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5647937B.40901@gmail.com>
     [not found] ` <1447690852.11547.66.camel@redhat.com>
     [not found]   ` <564A071D.2000804@gmail.com>
2015-11-16 16:48     ` [Qemu-devel] virtio-input questions Jiri 'Ghormoon' Novak
2015-11-16 17:16       ` Gerd Hoffmann
2015-11-16 17:28         ` Jiri 'Ghormoon' Novak [this message]

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=564A1250.3080908@gmail.com \
    --to=ghormoon@gmail.com \
    --cc=alex.williamson@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).