From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felix Kuperjans Subject: Re: Send A Fake PS/2 Packet to QEMU and Mouse Pointer on PV OS Date: Mon, 20 Sep 2010 15:20:10 +0200 Message-ID: <4C975F8A.4040704@desaster-games.com> References: <4C97434E.4000109@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070803090303090607050609" 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@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------070803090303090607050609 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=3D"alsa" environment variable works, too. No idea whethe= r 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 "=E6=B6=82=E5=A0=82=E8=A8=93(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() =3D> > 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 > 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=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) > 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 > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > --------------070803090303090607050609 Content-Type: text/plain; name="xen-tools-ioemu-alsa.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xen-tools-ioemu-alsa.patch" ZGlmZiAtdXIgeGVuLTQuMC4wL3Rvb2xzL2lvZW11LXFlbXUteGVuL3hlbi1zZXR1cCB4ZW4t NC4wLjAuYWxzYS90b29scy9pb2VtdS1xZW11LXhlbi94ZW4tc2V0dXAKLS0tIHhlbi00LjAu MC90b29scy9pb2VtdS1xZW11LXhlbi94ZW4tc2V0dXAJMjAxMC0wMy0yNCAxODoxNjo1MS4w MDAwMDAwMDAgKzAxMDAKKysrIHhlbi00LjAuMC5hbHNhL3Rvb2xzL2lvZW11LXFlbXUteGVu L3hlbi1zZXR1cAkyMDEwLTA0LTA5IDE2OjEzOjIxLjAwNjI1NjExNCArMDIwMApAQCAtMTYs OCArMTYsOCBAQAogaWYgdGVzdCAteiAiJHtYRU5fU0NSSVBUX0RJUn0iOyB0aGVuCiAJWEVO X1NDUklQVF9ESVI9Ii9ldGMveGVuL3NjcmlwdHMiCiBmaQoKLS4vY29uZmlndXJlIC0tZGlz YWJsZS1nZngtY2hlY2sgLS1kaXNhYmxlLWN1cnNlcyAtLWRpc2FibGUtc2xpcnAgIiRAIiAt LXByZWZpeD0ke1BSRUZJWH0KKy4vY29uZmlndXJlIC0tYXVkaW8tZHJ2LWxpc3Q9YWxzYSAt LWVuYWJsZS1taXhlbXUgLS1kaXNhYmxlLWdmeC1jaGVjayAtLWRpc2FibGUtY3Vyc2VzIC0t ZGlzYWJsZS1zbGlycCAiJEAiIC0tcHJlZml4PSR7UFJFRklYfQoKIGlmIFsgIngkWEVOX1JP T1QiICE9IHggXTsgdGhlbgogCWVjaG8gIlhFTl9ST09UPSRYRU5fUk9PVCIgPj5jb25maWct aG9zdC5tYWsK --------------070803090303090607050609 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------070803090303090607050609--