From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3kNW-0000jy-G4 for qemu-devel@nongnu.org; Wed, 14 Sep 2011 03:59:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3kNV-0001lo-CF for qemu-devel@nongnu.org; Wed, 14 Sep 2011 03:59:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3kNV-0001lX-3b for qemu-devel@nongnu.org; Wed, 14 Sep 2011 03:59:29 -0400 Message-ID: <4E705EDB.9060702@redhat.com> Date: Wed, 14 Sep 2011 09:59:23 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: 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: TeLeMan Cc: qemu-devel@nongnu.org, Gerd Hoffmann 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. Paolo