From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?Iua2guWgguiokyhUYW5nLUhzdW4gVHUpIg==?= Subject: Re: Send A Fake PS/2 Packet to QEMU and Mouse Pointer on PV OS Date: Sun, 26 Sep 2010 15:26:02 +0800 Message-ID: <4C9EF58A.60206@gmail.com> References: <4C97434E.4000109@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4C97434E.4000109@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel List-Id: xen-devel@lists.xenproject.org Dear all: For the question1, I try to use the function ps2_queue() to send a=20 PS/2 "keyboard" packet, and it works fine. But the PS/2 mouse still cannot work. Does QEMU use a USB mouse and not=20 support a PS/2 mouse? =E6=96=BC 2010/9/20 =E4=B8=8B=E5=8D=88 07:19, "=E6=B6=82=E5=A0=82=E8=A8=93= (Tang-Hsun Tu)" =E6=8F=90=E5=88=B0: > 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=20 > mouse, respectively. > And these functions will make a suitable packet for low-level=20 > hardware, e.g. PS/2 or USB. > > For a PS/2 mouse, there is a call chain ps2_mouse_event() =3D>=20 > ps2_mouse_send_packet() =3D> ps2_queue() > when the function kbd_mouse_event() is called. > However, when I make a fake PS/2 mouse packet and directly call=20 > ps2_queue() > to put the packet to PS/2 queue. > I store the PS2MouseState "s" when 8042 initializes and call=20 > 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=20 > consloe, > but the result is the same. What else I forgot to signal? How could I=20 > 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=3D'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)=20 > between multiple DomainUs? > (The device will be busy when I create a domain.) If can, how could I d= o? > > > Thanks! > > Best Regards, > Tang-Hsun Tu