From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Oms-0004e3-Gv for qemu-devel@nongnu.org; Thu, 02 Jun 2016 05:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8Omn-0006rk-Fs for qemu-devel@nongnu.org; Thu, 02 Jun 2016 05:19:34 -0400 Received: from m109-177.yeah.net ([123.58.177.109]:36187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8Omm-0006rN-BE for qemu-devel@nongnu.org; Thu, 02 Jun 2016 05:19:29 -0400 Received: from mail-yw0-f176.google.com (mail-yw0-f176.google.com [209.85.161.176]) by m199-177.yeah.net (HMail) with ESMTPSA id BE318110575D for ; Thu, 2 Jun 2016 17:19:14 +0800 (CST) Received: by mail-yw0-f176.google.com with SMTP id c127so44205549ywb.1 for ; Thu, 02 Jun 2016 02:19:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1464856651.24775.56.camel@redhat.com> References: <1464847505-27478-1-git-send-email-hongyang.yang@easystack.cn> <1464856651.24775.56.camel@redhat.com> Date: Thu, 2 Jun 2016 17:19:12 +0800 Message-ID: From: Yang Hongyang Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] ps2: take exact use of ps2 buffer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Yang Hongyang , Gonglei , qemu devel , Juan Quintela Hi Gerd, Thanks for reply! On Thu, Jun 2, 2016 at 4:37 PM, Gerd Hoffmann wrote: > On Do, 2016-06-02 at 14:05 +0800, Yang Hongyang wrote: > > According to PS/2 Mouse/Keyboard Protocol, the keyboard output buffer > > size is 16 bytes, but we only use 15 bytes actually, this causes some > > problem, for example, if I submit "123456789" in a bunch through VNC, > > the actual result will be "12345678888888888...", because the 16th key > > event which is "8" key up is dropped. > > What if you try a 10-char string next? Actually I've tested this patch, I submit multiple 10-char string, things work as expected, it only takes the first 8-char. > Things are failing again. > Keyboards are low-bandwidth devices, you can't flood them with data and > expect things to work. > The poin is not about to make it work with more then 8 string, it is to make it competible with the protocol, which is a 16-bytes buffer, apparantly we are not following this and which do cause the problem. This chunk of code originally uses full QUEUE_SIZE buffer, and in this commit 2858ab09e6f708e3, it changes the behaviour implicitly. > Try this one instead: https://patchwork.ozlabs.org/patch/628491/ This seems like a good feature, we will use this, thanks, but it's not related to this patch. > > > cheers, > Gerd > > > -- Thanks, Yang