summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell2018-06-19 15:34:06 +0200
committerPeter Maydell2018-06-19 15:34:06 +0200
commite8729c154b3fb97232e640a43c832122f0fdd32d (patch)
tree21ef492afe9db9fdf85788405667d62437736836 /hw
parentMerge remote-tracking branch 'remotes/kraxel/tags/vga-20180618-pull-request' ... (diff)
parentps2: check PS2Queue wptr pointer in post_load routine (diff)
downloadqemu-e8729c154b3fb97232e640a43c832122f0fdd32d.tar.gz
qemu-e8729c154b3fb97232e640a43c832122f0fdd32d.tar.xz
qemu-e8729c154b3fb97232e640a43c832122f0fdd32d.zip
Merge remote-tracking branch 'remotes/kraxel/tags/input-20180618-pull-request' into staging
input: ps2 post_load fix. # gpg: Signature made Mon 18 Jun 2018 11:18:30 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/input-20180618-pull-request: ps2: check PS2Queue wptr pointer in post_load routine Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/input/ps2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index eeec6180d0..fdfcadf9a1 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -927,7 +927,7 @@ static void ps2_common_post_load(PS2State *s)
/* reset rptr/wptr/count */
q->rptr = 0;
- q->wptr = size;
+ q->wptr = (size == PS2_QUEUE_SIZE) ? 0 : size;
q->count = size;
s->update_irq(s->update_arg, q->count != 0);
}