* extending qemu-dm
@ 2011-11-16 20:26 John Sherwood
2012-01-03 20:24 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 10+ messages in thread
From: John Sherwood @ 2011-11-16 20:26 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1220 bytes --]
Hello,
I'm working on a project and trying to pass through a PS/2 mouse + keyboard
to a hardware VM. I've played with numerous things (including the obvious,
using USB), but after finding no alternative, it seems like the best way to
approach this would be to modify qemu-dm to pipe through data from
/dev/input/eventwhatever to the keyboard/mouse that qemu provides (and then
using this version of qemu-dm only for this special case).
I've been looking through the 4.1.0 source, specifically in
tools/ioemu-qemu-xen, and it appears that I'd want to (for the keyboard)
pass key codes from /dev/input through the kbd_put_keycode function. From
what I can tell, I'd probably want to split off a thread to do this
somewhere in main() in vl.c. I was hoping that I could get some
confirmation about whether I'm looking in the right places and/or
suggestions about how to cleanly implement this. Odds are I won't be able
to go the whole 9 yards and implement configuration options for xm or
command line switches for qemu-dm, but I would suspect that someone,
somewhere, someday will also want this kind of ability. If it's already
possible to pass through PS/2 devices without getting nuts in QEMU, that's
cool too :)
[-- Attachment #1.2: Type: text/html, Size: 1275 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2011-11-16 20:26 extending qemu-dm John Sherwood
@ 2012-01-03 20:24 ` Konrad Rzeszutek Wilk
2012-01-03 20:45 ` John Sherwood
0 siblings, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-03 20:24 UTC (permalink / raw)
To: John Sherwood; +Cc: xen-devel
On Wed, Nov 16, 2011 at 03:26:06PM -0500, John Sherwood wrote:
> Hello,
>
> I'm working on a project and trying to pass through a PS/2 mouse + keyboard
> to a hardware VM. I've played with numerous things (including the obvious,
> using USB), but after finding no alternative, it seems like the best way to
> approach this would be to modify qemu-dm to pipe through data from
> /dev/input/eventwhatever to the keyboard/mouse that qemu provides (and then
> using this version of qemu-dm only for this special case).
That is certainly one way. But you would have an interesting problem that whatever
you type on your physical keyboard would appear in the guest _and_ in the
domain 0.
>
> I've been looking through the 4.1.0 source, specifically in
> tools/ioemu-qemu-xen, and it appears that I'd want to (for the keyboard)
> pass key codes from /dev/input through the kbd_put_keycode function. From
> what I can tell, I'd probably want to split off a thread to do this
> somewhere in main() in vl.c. I was hoping that I could get some
> confirmation about whether I'm looking in the right places and/or
> suggestions about how to cleanly implement this. Odds are I won't be able
> to go the whole 9 yards and implement configuration options for xm or
> command line switches for qemu-dm, but I would suspect that someone,
> somewhere, someday will also want this kind of ability. If it's already
> possible to pass through PS/2 devices without getting nuts in QEMU, that's
> cool too :)
Can't do that. The PS/2 is one of those legacy beasts that depends on ioports.
But now that I think of it, maybe you can. In the guest config you can specify
the ioports that you want to pass in. I hadn't tried to do this for the keyboard
ports but maybe that will work for you?
Or could you use synergy?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-03 20:24 ` Konrad Rzeszutek Wilk
@ 2012-01-03 20:45 ` John Sherwood
2012-01-03 22:40 ` Konrad Rzeszutek Wilk
2012-01-09 12:29 ` Samuel Thibault
0 siblings, 2 replies; 10+ messages in thread
From: John Sherwood @ 2012-01-03 20:45 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 2724 bytes --]
On Tue, Jan 3, 2012 at 3:24 PM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:
> On Wed, Nov 16, 2011 at 03:26:06PM -0500, John Sherwood wrote:
> > Hello,
> >
> > I'm working on a project and trying to pass through a PS/2 mouse +
> keyboard
> > to a hardware VM. I've played with numerous things (including the
> obvious,
> > using USB), but after finding no alternative, it seems like the best way
> to
> > approach this would be to modify qemu-dm to pipe through data from
> > /dev/input/eventwhatever to the keyboard/mouse that qemu provides (and
> then
> > using this version of qemu-dm only for this special case).
>
> That is certainly one way. But you would have an interesting problem that
> whatever
> you type on your physical keyboard would appear in the guest _and_ in the
> domain 0.
>
yeah, I actually tested it and it was quite amusing to watch the keyboard
and mouse move on the monitor and in VNC.
>
> >
> > I've been looking through the 4.1.0 source, specifically in
> > tools/ioemu-qemu-xen, and it appears that I'd want to (for the keyboard)
> > pass key codes from /dev/input through the kbd_put_keycode function.
> From
> > what I can tell, I'd probably want to split off a thread to do this
> > somewhere in main() in vl.c. I was hoping that I could get some
> > confirmation about whether I'm looking in the right places and/or
> > suggestions about how to cleanly implement this. Odds are I won't be
> able
> > to go the whole 9 yards and implement configuration options for xm or
> > command line switches for qemu-dm, but I would suspect that someone,
> > somewhere, someday will also want this kind of ability. If it's already
> > possible to pass through PS/2 devices without getting nuts in QEMU,
> that's
> > cool too :)
>
> Can't do that. The PS/2 is one of those legacy beasts that depends on
> ioports.
> But now that I think of it, maybe you can. In the guest config you can
> specify
> the ioports that you want to pass in. I hadn't tried to do this for the
> keyboard
> ports but maybe that will work for you?
>
>
I tried forwarding the ioports (off the top of my head, I remember trying
60 and 64) but didn't have any luck - the kb/mouse weren't forwarded
despite adding the requisite ioports config as per the docs. I theorized I
was leaving off some config for the kernel, but didn't find anything. I
agree that it certainly seems like this should work, and if you could
elaborate on anything I could have goofed on, that would certainly be great
(and hopefully, useful for anyone else who might try this in the future)
> Or could you use synergy?
>
I actually did try synergy, but I couldn't get it to work due to
requirements for the OSes that were being run.
[-- Attachment #1.2: Type: text/html, Size: 3512 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-03 20:45 ` John Sherwood
@ 2012-01-03 22:40 ` Konrad Rzeszutek Wilk
2012-01-04 1:16 ` John Sherwood
2012-01-09 12:29 ` Samuel Thibault
1 sibling, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-03 22:40 UTC (permalink / raw)
To: John Sherwood; +Cc: xen-devel
On Tue, Jan 03, 2012 at 03:45:17PM -0500, John Sherwood wrote:
> On Tue, Jan 3, 2012 at 3:24 PM, Konrad Rzeszutek Wilk <
> konrad.wilk@oracle.com> wrote:
>
> > On Wed, Nov 16, 2011 at 03:26:06PM -0500, John Sherwood wrote:
> > > Hello,
> > >
> > > I'm working on a project and trying to pass through a PS/2 mouse +
> > keyboard
> > > to a hardware VM. I've played with numerous things (including the
> > obvious,
> > > using USB), but after finding no alternative, it seems like the best way
> > to
> > > approach this would be to modify qemu-dm to pipe through data from
> > > /dev/input/eventwhatever to the keyboard/mouse that qemu provides (and
> > then
> > > using this version of qemu-dm only for this special case).
> >
> > That is certainly one way. But you would have an interesting problem that
> > whatever
> > you type on your physical keyboard would appear in the guest _and_ in the
> > domain 0.
> >
>
> yeah, I actually tested it and it was quite amusing to watch the keyboard
> and mouse move on the monitor and in VNC.
>
>
> >
> > >
> > > I've been looking through the 4.1.0 source, specifically in
> > > tools/ioemu-qemu-xen, and it appears that I'd want to (for the keyboard)
> > > pass key codes from /dev/input through the kbd_put_keycode function.
> > From
> > > what I can tell, I'd probably want to split off a thread to do this
> > > somewhere in main() in vl.c. I was hoping that I could get some
> > > confirmation about whether I'm looking in the right places and/or
> > > suggestions about how to cleanly implement this. Odds are I won't be
> > able
> > > to go the whole 9 yards and implement configuration options for xm or
> > > command line switches for qemu-dm, but I would suspect that someone,
> > > somewhere, someday will also want this kind of ability. If it's already
> > > possible to pass through PS/2 devices without getting nuts in QEMU,
> > that's
> > > cool too :)
> >
> > Can't do that. The PS/2 is one of those legacy beasts that depends on
> > ioports.
> > But now that I think of it, maybe you can. In the guest config you can
> > specify
> > the ioports that you want to pass in. I hadn't tried to do this for the
> > keyboard
> > ports but maybe that will work for you?
> >
> >
> I tried forwarding the ioports (off the top of my head, I remember trying
> 60 and 64) but didn't have any luck - the kb/mouse weren't forwarded
> despite adding the requisite ioports config as per the docs. I theorized I
> was leaving off some config for the kernel, but didn't find anything. I
> agree that it certainly seems like this should work, and if you could
> elaborate on anything I could have goofed on, that would certainly be great
> (and hopefully, useful for anyone else who might try this in the future)
I think you might be missing the ioperm patches. The are in devel/ioperm
on git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
>
>
> > Or could you use synergy?
> >
>
> I actually did try synergy, but I couldn't get it to work due to
> requirements for the OSes that were being run.
Huh? What OS is that? Anyhow another thought that occured to me is
what Virtual Computer or Xen Client Project do.. which is something
I don't really know what they do but their demo showed the user hitting
'Alt-Tab' on switching between domains on the laptop screen. The keyboard
is certainly PS/2 so I wonder how they "injected" the keyboard in the guest.
It might be curious to look at their patches: http://xen.org/products/xci_source.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-03 22:40 ` Konrad Rzeszutek Wilk
@ 2012-01-04 1:16 ` John Sherwood
2012-01-04 14:25 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 10+ messages in thread
From: John Sherwood @ 2012-01-04 1:16 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 3962 bytes --]
the synergy incompatibilities were largely package related, due to
requirements for a different application that we were supposed to deploy.
I'll try the ioperm patches next chance I have.
On Tue, Jan 3, 2012 at 5:40 PM, Konrad Rzeszutek Wilk <
konrad.wilk@oracle.com> wrote:
> On Tue, Jan 03, 2012 at 03:45:17PM -0500, John Sherwood wrote:
> > On Tue, Jan 3, 2012 at 3:24 PM, Konrad Rzeszutek Wilk <
> > konrad.wilk@oracle.com> wrote:
> >
> > > On Wed, Nov 16, 2011 at 03:26:06PM -0500, John Sherwood wrote:
> > > > Hello,
> > > >
> > > > I'm working on a project and trying to pass through a PS/2 mouse +
> > > keyboard
> > > > to a hardware VM. I've played with numerous things (including the
> > > obvious,
> > > > using USB), but after finding no alternative, it seems like the best
> way
> > > to
> > > > approach this would be to modify qemu-dm to pipe through data from
> > > > /dev/input/eventwhatever to the keyboard/mouse that qemu provides
> (and
> > > then
> > > > using this version of qemu-dm only for this special case).
> > >
> > > That is certainly one way. But you would have an interesting problem
> that
> > > whatever
> > > you type on your physical keyboard would appear in the guest _and_ in
> the
> > > domain 0.
> > >
> >
> > yeah, I actually tested it and it was quite amusing to watch the keyboard
> > and mouse move on the monitor and in VNC.
> >
> >
> > >
> > > >
> > > > I've been looking through the 4.1.0 source, specifically in
> > > > tools/ioemu-qemu-xen, and it appears that I'd want to (for the
> keyboard)
> > > > pass key codes from /dev/input through the kbd_put_keycode function.
> > > From
> > > > what I can tell, I'd probably want to split off a thread to do this
> > > > somewhere in main() in vl.c. I was hoping that I could get some
> > > > confirmation about whether I'm looking in the right places and/or
> > > > suggestions about how to cleanly implement this. Odds are I won't be
> > > able
> > > > to go the whole 9 yards and implement configuration options for xm or
> > > > command line switches for qemu-dm, but I would suspect that someone,
> > > > somewhere, someday will also want this kind of ability. If it's
> already
> > > > possible to pass through PS/2 devices without getting nuts in QEMU,
> > > that's
> > > > cool too :)
> > >
> > > Can't do that. The PS/2 is one of those legacy beasts that depends on
> > > ioports.
> > > But now that I think of it, maybe you can. In the guest config you can
> > > specify
> > > the ioports that you want to pass in. I hadn't tried to do this for the
> > > keyboard
> > > ports but maybe that will work for you?
> > >
> > >
> > I tried forwarding the ioports (off the top of my head, I remember trying
> > 60 and 64) but didn't have any luck - the kb/mouse weren't forwarded
> > despite adding the requisite ioports config as per the docs. I
> theorized I
> > was leaving off some config for the kernel, but didn't find anything. I
> > agree that it certainly seems like this should work, and if you could
> > elaborate on anything I could have goofed on, that would certainly be
> great
> > (and hopefully, useful for anyone else who might try this in the future)
>
> I think you might be missing the ioperm patches. The are in devel/ioperm
> on git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
>
> >
> >
> > > Or could you use synergy?
> > >
> >
> > I actually did try synergy, but I couldn't get it to work due to
> > requirements for the OSes that were being run.
>
> Huh? What OS is that? Anyhow another thought that occured to me is
> what Virtual Computer or Xen Client Project do.. which is something
> I don't really know what they do but their demo showed the user hitting
> 'Alt-Tab' on switching between domains on the laptop screen. The keyboard
> is certainly PS/2 so I wonder how they "injected" the keyboard in the
> guest.
> It might be curious to look at their patches:
> http://xen.org/products/xci_source.html
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 5206 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-04 1:16 ` John Sherwood
@ 2012-01-04 14:25 ` Konrad Rzeszutek Wilk
2012-01-09 10:27 ` Jean Guyader
0 siblings, 1 reply; 10+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-04 14:25 UTC (permalink / raw)
To: John Sherwood; +Cc: xen-devel
On Tue, Jan 03, 2012 at 08:16:13PM -0500, John Sherwood wrote:
> the synergy incompatibilities were largely package related, due to
> requirements for a different application that we were supposed to deploy.
> I'll try the ioperm patches next chance I have.
Please don't top post.
> > http://xen.org/products/xci_source.html
(the ioemu-pq git tree, look for 'ps2-passthrough')
.. has a driver in userspace that actually takes PS/2 input and shovels
them using QEMU to the guest. That might be interesting for you to look at
as well.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-04 14:25 ` Konrad Rzeszutek Wilk
@ 2012-01-09 10:27 ` Jean Guyader
2012-01-10 12:01 ` Dietmar Hahn
0 siblings, 1 reply; 10+ messages in thread
From: Jean Guyader @ 2012-01-09 10:27 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel, John Sherwood
On 4 January 2012 14:25, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> On Tue, Jan 03, 2012 at 08:16:13PM -0500, John Sherwood wrote:
>> the synergy incompatibilities were largely package related, due to
>> requirements for a different application that we were supposed to deploy.
>> I'll try the ioperm patches next chance I have.
>
> Please don't top post.
>
>> > http://xen.org/products/xci_source.html
>
> (the ioemu-pq git tree, look for 'ps2-passthrough')
>
> .. has a driver in userspace that actually takes PS/2 input and shovels
> them using QEMU to the guest. That might be interesting for you to look at
> as well.
>
Hi,
This patch is at a very rough stage.
The best way to do what you want would be to open the HID device
directly (/dev/event*) from Qemu
and forward the event to do the PS2 device model.
That works fine until you want to share the input between multiple VM,
at this point you probably
what a new daemon to play the gate keeper.
Jean
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-03 20:45 ` John Sherwood
2012-01-03 22:40 ` Konrad Rzeszutek Wilk
@ 2012-01-09 12:29 ` Samuel Thibault
2012-01-09 16:36 ` John Sherwood
1 sibling, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2012-01-09 12:29 UTC (permalink / raw)
To: John Sherwood; +Cc: xen-devel, Konrad Rzeszutek Wilk
John Sherwood, le Tue 03 Jan 2012 15:45:17 -0500, a écrit :
> On Tue, Jan 3, 2012 at 3:24 PM, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> wrote:
> Can't do that. The PS/2 is one of those legacy beasts that depends on
> ioports.
> But now that I think of it, maybe you can. In the guest config you can
> specify
> the ioports that you want to pass in. I hadn't tried to do this for the
> keyboard
> ports but maybe that will work for you?
>
>
>
> I tried forwarding the ioports (off the top of my head, I remember trying 60
> and 64) but didn't have any luck - the kb/mouse weren't forwarded despite
> adding the requisite ioports config as per the docs.
Did you also pass the IRQ?
Samuel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-09 12:29 ` Samuel Thibault
@ 2012-01-09 16:36 ` John Sherwood
0 siblings, 0 replies; 10+ messages in thread
From: John Sherwood @ 2012-01-09 16:36 UTC (permalink / raw)
To: Samuel Thibault, John Sherwood, Konrad Rzeszutek Wilk, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1022 bytes --]
On Mon, Jan 9, 2012 at 7:29 AM, Samuel Thibault <
samuel.thibault@ens-lyon.org> wrote:
> John Sherwood, le Tue 03 Jan 2012 15:45:17 -0500, a écrit :
> > On Tue, Jan 3, 2012 at 3:24 PM, Konrad Rzeszutek Wilk <
> konrad.wilk@oracle.com>
> > wrote:
> > Can't do that. The PS/2 is one of those legacy beasts that depends on
> > ioports.
> > But now that I think of it, maybe you can. In the guest config you
> can
> > specify
> > the ioports that you want to pass in. I hadn't tried to do this for
> the
> > keyboard
> > ports but maybe that will work for you?
> >
> >
> >
> > I tried forwarding the ioports (off the top of my head, I remember
> trying 60
> > and 64) but didn't have any luck - the kb/mouse weren't forwarded despite
> > adding the requisite ioports config as per the docs.
>
> Did you also pass the IRQ?
>
> Samuel
>
I believe so, though I haven't had the time pull up the system I was
working on and look at the configuration files I tried with.
[-- Attachment #1.2: Type: text/html, Size: 1515 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: extending qemu-dm
2012-01-09 10:27 ` Jean Guyader
@ 2012-01-10 12:01 ` Dietmar Hahn
0 siblings, 0 replies; 10+ messages in thread
From: Dietmar Hahn @ 2012-01-10 12:01 UTC (permalink / raw)
To: xen-devel; +Cc: John Sherwood, Jean Guyader, Konrad Rzeszutek Wilk
Am Montag 09 Januar 2012, 10:27:50 schrieb Jean Guyader:
> On 4 January 2012 14:25, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> > On Tue, Jan 03, 2012 at 08:16:13PM -0500, John Sherwood wrote:
> >> the synergy incompatibilities were largely package related, due to
> >> requirements for a different application that we were supposed to deploy.
> >> I'll try the ioperm patches next chance I have.
> >
> > Please don't top post.
> >
> >> > http://xen.org/products/xci_source.html
> >
> > (the ioemu-pq git tree, look for 'ps2-passthrough')
> >
> > .. has a driver in userspace that actually takes PS/2 input and shovels
> > them using QEMU to the guest. That might be interesting for you to look at
> > as well.
> >
>
> Hi,
>
> This patch is at a very rough stage.
>
> The best way to do what you want would be to open the HID device
> directly (/dev/event*) from Qemu
> and forward the event to do the PS2 device model.
> That works fine until you want to share the input between multiple VM,
> at this point you probably
> what a new daemon to play the gate keeper.
>
> Jean
I did such hack solution there:
http://lists.xen.org/archives/html/xen-devel/2010-03/msg01292.html
Dietmar.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
--
Company details: http://ts.fujitsu.com/imprint.html
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-01-10 12:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16 20:26 extending qemu-dm John Sherwood
2012-01-03 20:24 ` Konrad Rzeszutek Wilk
2012-01-03 20:45 ` John Sherwood
2012-01-03 22:40 ` Konrad Rzeszutek Wilk
2012-01-04 1:16 ` John Sherwood
2012-01-04 14:25 ` Konrad Rzeszutek Wilk
2012-01-09 10:27 ` Jean Guyader
2012-01-10 12:01 ` Dietmar Hahn
2012-01-09 12:29 ` Samuel Thibault
2012-01-09 16:36 ` John Sherwood
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).