From: Yang Hongyang <hongyang.yang@easystack.cn>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Gonglei <arei.gonglei@huawei.com>,
Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] [PATCH] ps2: take exact use of ps2 buffer
Date: Thu, 2 Jun 2016 14:05:05 +0800 [thread overview]
Message-ID: <1464847505-27478-1-git-send-email-hongyang.yang@easystack.cn> (raw)
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.
Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gonglei <arei.gonglei@huawei.com>
Cc: Juan Quintela <quintela@redhat.com>
---
hw/input/ps2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index a8aa36f..0726270 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -143,7 +143,7 @@ void ps2_queue(void *opaque, int b)
PS2State *s = (PS2State *)opaque;
PS2Queue *q = &s->queue;
- if (q->count >= PS2_QUEUE_SIZE - 1)
+ if (q->count >= PS2_QUEUE_SIZE)
return;
q->data[q->wptr] = b;
if (++q->wptr == PS2_QUEUE_SIZE)
--
1.8.3.1
next reply other threads:[~2016-06-02 6:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 6:05 Yang Hongyang [this message]
2016-06-02 8:37 ` [Qemu-devel] [PATCH] ps2: take exact use of ps2 buffer Gerd Hoffmann
2016-06-02 9:19 ` Yang Hongyang
2016-06-02 10:05 ` Gerd Hoffmann
2016-06-02 10:34 ` Yang Hongyang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464847505-27478-1-git-send-email-hongyang.yang@easystack.cn \
--to=hongyang.yang@easystack.cn \
--cc=arei.gonglei@huawei.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).