pckbd: correctly disable PS/2 communication
commitf6f57a82989725fa6f23a4e55cebbc85a54b77c7
authorVolker Rümelin <vr_qemu@t-online.de>
Tue, 25 May 2021 18:14:39 +0000 (25 20:14 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 26 May 2021 09:32:20 +0000 (26 11:32 +0200)
tree019454bdadfca140af9262dd7cc941ea676c5256
parente4697fabb58133c3cfa5d3afe727db80beda5af7
pckbd: correctly disable PS/2 communication

Currently the PS/2 controller command KBD_CCMD_MOUSE_DISABLE
doesn't disable the PS/2 mouse communication at all, and the
PS/2 controller commands KBD_CCMD_KBD_DISABLE and
KBD_CCMD_KBD_ENABLE only disable and enable the keyboard
interrupt, which is very different from what a real PS/2
controller does. A guest may notice the difference.

Mask out pending data on disabled queues to correctly disable
the PS/2 controller communication.

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20210525181441.27768-10-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/input/pckbd.c