ps2: Clear the PS/2 queue and obey disable
commit143c04c7e0639e53086519592ead15d2556bfbf2
authorGeoffrey McRae <geoff@hostfission.com>
Mon, 7 May 2018 13:01:46 +0000 (7 23:01 +1000)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 15 May 2018 09:22:33 +0000 (15 11:22 +0200)
tree474fb067c0296d96a36b52c5dbd0eaec1b69d356
parentfbd3a489df9953e2a5d017c922f3c103b2426952
ps2: Clear the PS/2 queue and obey disable

This allows guest's to correctly reinitialize and identify the mouse
should the guest decide to re-scan or reset during mouse input events.

When the guest sends the "Identify" command, due to the PC's hardware
architecutre it is impossible to reliably determine the response from
the command amongst other streaming data, such as mouse or keyboard
events. Standard practice is for the guest to disable the device and
then issue the identify command, so this must be obeyed.

Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
Message-Id: <20180507150303.7486B381924@moya.office.hostfission.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/input/ps2.c