From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIsK-0006Fs-Vg for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:41:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUIsJ-00074p-Gf for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:41:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUIsJ-00074b-77 for qemu-devel@nongnu.org; Mon, 22 Apr 2013 11:41:51 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3MFfoHb032217 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 22 Apr 2013 11:41:50 -0400 Message-ID: <51755A31.9060809@redhat.com> Date: Mon, 22 Apr 2013 17:41:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1366346658-4680-1-git-send-email-akong@redhat.com> <5172BD04.2050504@redhat.com> <20130422073252.GC1938@t430s.nay.redhat.com> <20130422080935.GA29975@t430s.nay.redhat.com> <517503E0.1080906@redhat.com> <20130422084350.17b2941b@redhat.com> <51753505.9020107@redhat.com> <51753C8B.5080504@redhat.com> <517549F2.3020809@redhat.com> <5175554B.20607@redhat.com> In-Reply-To: <5175554B.20607@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] monitor: intervally send down events to guest in hold time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Amos Kong , qemu-devel , Luiz Capitulino Il 22/04/2013 17:20, Gerd Hoffmann ha scritto: >> > Yes, if PS/2 keyboard emulation emulated the autorepeat rate/delay, then >> > the code we have in QMP would just work. However it would need to be >> > done for all devices (ignoring repeated keydown events from the upper >> > layers, and creating its own repeated event). So it makes sense to have >> > it in common code and have keyboard devices just tell common code the >> > desired rate/delay. > Yep, that'll work too. Ok, in that sense Amos's patch is not too bad. The problems are that it hardcodes 100/100 as the repeat/delay, and that the autorepeat is only done for the send-key command. If the first was replaced with at least two #defines it would be acceptable IMO. >>> >> IIRC the (ps/2) kbd controller can be programmed with rate+delay. >> > >> > Yes, but we ignore the command. For the PS/2 keyboard, I think what we >> > send now to the guest is based on the rate/delay that is emulated in >> > software by the GUI layers (for Unix it should just be X11 for all of >> > SDL/VNC/Spice). > Exactly. Thats why keys getting stuck on migration isn't a big issue in > practice. Hmm, but if you press "a" and migrate, the receiver will see "key down a" and no "key up a". Software autorepeat will then generate an endless stream of a's... It isn't a big issue because it's just very unlikely to happen, or perhaps because no one plays games on VDI during migration. Paolo