From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4CBK-0002K4-Ek for qemu-devel@nongnu.org; Thu, 15 Sep 2011 09:40:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4CBE-0002pE-On for qemu-devel@nongnu.org; Thu, 15 Sep 2011 09:40:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4CBE-0002oQ-GU for qemu-devel@nongnu.org; Thu, 15 Sep 2011 09:40:40 -0400 Message-ID: <4E720054.3070705@redhat.com> Date: Thu, 15 Sep 2011 15:40:36 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <4E705EDB.9060702@redhat.com> In-Reply-To: <4E705EDB.9060702@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hid: vmstat fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: TeLeMan , qemu-devel@nongnu.org On 09/14/11 09:59, Paolo Bonzini wrote: > On 09/14/2011 09:40 AM, TeLeMan wrote: >>>> >> >>>> >> The commit "usb/hid: add hid_pointer_activate, use it" used >>>> >> HIDMouseState.mouse_grabbed in hid_pointer_activate(), so >>>> >> mouse_grabbed should be added into vmstat. >>> > >>> > Does this fix a bug? qemu_activate_mouse_event_handler is meant to be >>> > called once per execution of the VM, it is not guest state. >> Yes, this patch fixes the usb mouse not be working after loadvm in the >> guest windows. > > I'm wondering if, with your patch, Windows is actually using the PS/2 > mouse after loadvm... If that is the case, perhaps instead you can move > > if (hs->kind == HID_MOUSE || hs->kind == HID_TABLET) { > hid_pointer_activate(hs); > } > > from hw/usb-hid.c to hid_set_next_idle, which is called at post-load time. Makes sense to me. Did you try whenever that fixes the winxp issue? thanks, Gerd