[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Send A Fake PS/2 Packet to QEMU and Mouse Pointer on PV OS


  • To: Felix Kuperjans <felix@xxxxxxxxxxxxxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "æåè(Tang-Hsun Tu)" <iwantplay@xxxxxxxxx>
  • Date: Tue, 21 Sep 2010 11:27:20 +0800
  • Cc:
  • Delivery-date: Mon, 20 Sep 2010 20:30:19 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=aDhSwGACTM+y+w6rrYr7bGpNX1lSC0p9w6Od8ThchsE80b96jrys8o23+2aH5i+im3 wSSPrs+ReqPwzrFsah7RY8NoEd+untxBVdLqsoMkqh1sBwk7OXpyIMHgflyhXZvyI8uN SKiAfK7jrrIJ+DGRm7pJ19kQlFnpG3Vu8ZYs4=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi,

ÂÂÂÂÂÂ Thanks for your reply, the audio patch works.
I can play audio between DomUs.

æ 2010/9/20 äå 09:20, Felix Kuperjans æå:
 I can only answer your third question:

You can switch to using ALSA with qemu (no idea why this is *not* the
default), e.g. by recompiling xen-tools with the attached patch. In KVM,
a QEMU_AUDIO_DRV="alsa" environment variable works, too. No idea whether
XEN accepts it or not.

Another way with further control would be to use PulseAudio in the Dom0
and in the DomUs (I think there is even a windows port), which is able
to send the audio data over network connections, so you won't need any
virtual sound cards. I have no setup/tutorial at hand, but it should be
easy to find on the internet.

Regards,
Felix

Am 20.09.2010 13:19, schrieb "æåè(Tang-Hsun Tu)":
 Dear all:

      I am trying to send a fake event to input layer of QEMU,
i.e. keyboard and mouse.

      QEMU provides two API to send these input event,
that is, kbd_put_keycode() and kbd_mouse_event() for keyboard and
mouse, respectively.
And these functions will make a suitable packet for low-level
hardware, e.g. PS/2 or USB.

      For a PS/2 mouse, there is a call chain  ps2_mouse_event() =>
ps2_mouse_send_packet() => ps2_queue()
when the function kbd_mouse_event() is called.
However, when I make a fake PS/2 mouse packet and directly call
ps2_queue()
to put the packet to PS/2 queue.
I store the PS2MouseState "s" when 8042 initializes and call
ps2_queue() to send a event,
for example,
          ps2_queue(&s->common, 0x1001);
          ps2_queue(&s->common, 0);
          ps2_queue(&s->common, 0);

And I also insert some debug  message in ps2_read_data() function,
it works well and reads data from queue correctly..
But the mouse pointer does not move (even right/left click).
I also set the default mouse to "Mouse $0: QEMU PS/2 Mouse" in QEMU
consloe,
but the result is the same. What else I forgot to signal? How could I
fix it?


       The second question is when I create a PV Linux (Ubuntu),
the mouse pointer does not move correctly.
The screen (VNC) shows a black point and a mouse pointer,
and their speed does not the same.
In HVM XP, we can use usbdevice='tablet' to fix it,
but the same line does not work in PV Linux. How could I fix it?


      The last question is that does the sound can be shared (mixed)
between multiple DomainUs?
(The device will be busy when I create a domain.) If can, how could I do?


     Thanks!

Best Regards,
Tang-Hsun Tu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.