From nobody Sat Sep 26 21:37:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1787644365; cv=none; d=zohomail.com; s=zohoarc; b=Y/2UrQH3Zo+MNhaP5eB+hT/CtRsQcNg6U6V1z0RLyfmhPoQ5CyO4QPWYw4r18ukZBwvnn5D4n1Sebio6OW2CHodiaCqIe8f2OePus+GxzC4sj6MqzLPd9BY5w0KiMYzRYPjDPXlhTSKDfWC06eIE4/Zw2WY9MYrxyqodGkw9lBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1787644365; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CF9r+wFrr+LtECcusIwyFhC7OMpJcvsqeVVhK3QmwnE=; b=Gin9YRYo83sgXnTyXt/JocaQiKxkpc6TkGND3OLJRQBHe4YInVLW0bFQ+4YssUaPgUR/CNA8lzOOL/dDmBmX5dHnjDSbxZv+ydi1g1XE6ASkBUrLKvMDL93YWnPbRd9E3nnNEUz2zXbjJC54SRkIZwsbi2n0U5Dt0KtxQGwtTAY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1787644365507634.3011724042706; Tue, 25 Aug 2026 00:52:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wylxC-0002UB-6a; Tue, 25 Aug 2026 03:52:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wylx8-0002P0-Tc; Tue, 25 Aug 2026 03:52:15 -0400 Received: from nx209.node01.secure-mailgate.com ([89.22.108.209]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wylx7-0000WD-5B; Tue, 25 Aug 2026 03:52:14 -0400 Received: from web279.dogado.net ([31.47.255.59]) by node01.secure-mailgate.com with esmtps (TLS1.2) tls TLS_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1wylx1-00BrP4-Nm; Tue, 25 Aug 2026 09:52:08 +0200 Received: from Zeuss.fritz.box (p57b2f393.dip0.t-ipconnect.de [87.178.243.147]) (Authenticated sender: christian@quante.one) by web279.dogado.net (Postfix) with ESMTPSA id D9418280D5C; Tue, 25 Aug 2026 09:52:03 +0200 (CEST) X-SecureMailgate-Identity: christian@quante.one;web279.dogado.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quante.one; s=cloudpit; t=1787644324; bh=CF9r+wFrr+LtECcusIwyFhC7OMpJcvsqeVVhK3QmwnE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Za00UjI17UwZca98eND4s643j+Qxac7DUGjlw5yI4yPIMb2MIi9UzqxwSLAju4qUp 3XPXoUGTGF4wWuJCxRS+LG7LsH3osBcSJMBnC9rNS1WTlSVk9QHJNJs0yi1zgS3OII 95maQOedit3USxGudlLRspSlXWp8IiWtNTe0kCJM= X-SecureMailgate-Identity: christian@quante.one;web279.dogado.net From: Christian Quante To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Akihiko Odaki , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Christian Quante , qemu-stable@nongnu.org Subject: [PATCH v2 1/2] hw/input/ps2: answer unknown mouse commands with a resend Date: Tue, 25 Aug 2026 09:51:26 +0200 Message-ID: <20260825075127.34876-2-christian@quante.one> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260825075127.34876-1-christian@quante.one> References: <20260825075127.34876-1-christian@quante.one> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-PPP-Message-ID: <178764432471.4156384.15725179118189851441@web279.dogado.net> X-PPP-Vhost: quante.one X-Originating-IP: 31.47.255.59 X-SecureMailgate-Domain: web279.dogado.net X-SecureMailgate-Username: 31.47.255.59 Authentication-Results: secure-mailgate.com; auth=pass smtp.auth=31.47.255.59@web279.dogado.net X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: SB/global_tokens (0.00163121848371) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuUfROZglzMSOikXZVRc1++9ge6U8Krfy8vM YLiCHlpWvCu2SmbhJN1U9FKs8X3+Nt1HOctZ5X+40a9IXddeG3M38JQYgcgjsac3uQcQdCX4ROfH zJ6mVE7ewsipSVIfs4YZf73IxHzYo6YbzW2tE9daS5+h1uiHzk/Rfxfh461YLyu3RZI1CD15pCOE 1vk99RMxqKIdDR6RVaf4xWSq5/wwdOtYechJ/ikE1WgRg4cS6K5mANmx2g/2xIniaWLUPf0al0h7 43VOpKNY+4MjijihZK0EMmf3P50Ajf/tIX00Fuu2beRqilmjgQ6jA3UwYgm3QTha208ypFqQwBFb xm4JX7semJdl8Weuy8+tlMSTQwhoy9D5QZ6a84vJal7pM1XhlAOd290vPXa7Loma0jth+x0iJ0NX 07iZIeUSWePdS+owFPr4kjXuZPwOU47Z9+tq5AZ/VgY4/1MSalZaSE0Xlm9JxWHJPpadBM2/K6k0 SmWb8DAM0yQHR/Kl/6PX9fCJJxjBpnL/tp7zCBBsONo2NV1wECsBO24nb+iXicfKnEjazesecXSq 6E2O7be1y+aIcmpMVDzl83xTpNRpuXIWL2ttn2AKlI+BxW8Po6WH9YBjB+EFOclydL7eY59y/HTJ x1f8cSYcea87gxom5sSE5rdGhli52NelL26sLk0S7K3CpUXntKYdS6GKHvS9DymURsPX4P4OgrgK HAE+1ZD1fpgWuHFXDmLfQJkx7T4kqlzgoIDCOODCq76SSOO0S/3N5CHnpSyE7dI7NJAP8tHfG8qf iz5tzU9rDp4qhHs+yMGnlF7jEvlEc+6yXX6xwZNwkEbPPAyn+woPLe92lgqiTiFi6mSOpIVGC3jf hv2ohVrMb+vHd1/lDy6xTjfhpI6L+w/5R7nlEk3DxhpDnExnN1cs5ld/stLFN+97Tk2glwWGuyHH wLsOT0kPLKh1MXItz6QUpE/ldRTo/osaMFFScPZCk999cx2+go1g8+0qSU8lBysIgCGqonuzqB2w MqeT35ix5VehBc2cUR742vO7WzYhZyYQWsHmRvTqQYLF/f3+DdUiGiQvTDAKHEF+HgCeNnm0aqdW 3FI/XIVznGCn/pgoSvohRE11DD8eKil/fhIraTTvPshdokoIabrOxY7koUCAzDlPs1HzvHNk51fV 8at/mpOirO4Aj7K7pCc7ItScD5zigXzsp6Nnsau6H4R0yovSvmZoRFgdut2xcbwiszlVwj1n2JAv HUSGQgae9yL5VN/hOLZMLz9q8jgaxDUUIO4oAyvVarsDg28/KZaDNp2ZPxInuFzPz5WylMiMWg== X-Report-Abuse-To: spam@node04.secure-mailgate.com X-Complaints-To: abuse@node01.secure-mailgate.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=89.22.108.209; envelope-from=christian@quante.one; helo=nx209.node01.secure-mailgate.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @quante.one) X-ZM-MESSAGEID: 1787644369868158500 ps2_write_mouse() ends its command switch with a bare "default: break;", so an unknown command draws no reply at all. A real PS/2 device answers every byte it is given -- ACK (0xFA) when it understood one, resend (0xFE) when it did not -- and a guest that gets nothing back is left waiting out its reply timeout. The keyboard path in the same file has answered unknown commands with KBD_REPLY_RESEND since commit 06b3611fc2a3 ("ps2: reject unknown commands, instead of blindly accepting them"). Two guests were measured on this. OS/2 probes the mouse with the vendor command 0xBB, which QEMU does not implement, and then polls the status port until its own timeout runs out. On a Warp 3 guest that wait costs about 25 ms of every boot under TCG, and 2.1 s under KVM, where each of those polls leaves the guest. With this patch the wait ends on the first read: the guest takes the same error path an unexpected reply would, and does not retry. Linux runs into two of them while probing the mouse: the ALPS probe sends 0xEC (reset wrap mode), which ps2_write_mouse() only answers while the mouse is in wrap mode, and the TrackPoint probe sends 0xE1. Each costs libps2 a 200 ms reply timeout. Timing the psmouse detection from a mark written to /dev/kmsg to the kernel's "input:" line, three boots each of a 6.18.35 kernel under TCG: 426.7/428.8/441.6 ms without this patch, 21.4/21.6/21.2 ms with it. The mouse is detected identically either way; only the error the probe ends in changes, from -EIO (nothing came back at all) to -EPROTO (libps2 gives up after its second attempt). The specification's second stage -- 0xFC (Error) when the byte after a rejected one is invalid as well -- is deliberately left out. It would need state that has to survive migration, no guest is known to test for it, and the keyboard path does without it as well. Cc: qemu-stable@nongnu.org Signed-off-by: Christian Quante Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Akihiko Odaki --- hw/input/ps2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 5516eb262d..e8300d2d83 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -73,6 +73,7 @@ #define AUX_SET_DEFAULT 0xF6 #define AUX_RESET 0xFF /* Reset aux device */ #define AUX_ACK 0xFA /* Command byte ACK. */ +#define AUX_RESEND 0xFE /* Command NACK, send the cmd again */ =20 #define MOUSE_STATUS_REMOTE 0x40 #define MOUSE_STATUS_ENABLED 0x20 @@ -955,6 +956,11 @@ void ps2_write_mouse(PS2MouseState *s, int val) s->mouse_type); break; default: + /* + * A PS/2 device answers every command it is given; an unknown + * one draws a resend. + */ + ps2_queue(ps2, AUX_RESEND); break; } break; --=20 2.53.0 From nobody Sat Sep 26 21:37:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1787644361; cv=none; d=zohomail.com; s=zohoarc; b=ZugCWqoqAm/SCc5TMCJ/bcu/Ak/RWm6QmZVu7ydLkCvufMFtZuhQqulSFkTHQB7i6ykoHq4gbSPcJxafVQzJLntIvsCu4rCYuLJD35LZiEh/Z0Z9MaNrgfc0YhsZcJOpEPlI7IvEVTesBVdj6c7Qy9sWu+BXATBWld74eeK+FCs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1787644361; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hScJBLf5JE1ad734WvKcrcUa1hRunhwYrFZJL6aJdy4=; b=OyTiWl9Oe/HbYGJFXeZ5yA7IyySD6ngbHE/RDieLItHZBEa+VKFsk3lZXay13p4+azEe+XgWxpiTJ9+8D/8SCn/rokkKbeMY5kPTDzVV5+S4UFCAZnWjDtlqA8vEQis/iWs6+rP/wxcN5FmMtn1xnsJhW/xyZhXfnICJXOu007Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1787644361396453.72987431232525; Tue, 25 Aug 2026 00:52:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wylx8-0002On-Of; Tue, 25 Aug 2026 03:52:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wylx6-0002LB-9i for qemu-devel@nongnu.org; Tue, 25 Aug 2026 03:52:12 -0400 Received: from nx206.node02.secure-mailgate.com ([192.162.87.206]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wylx4-0000UA-H7 for qemu-devel@nongnu.org; Tue, 25 Aug 2026 03:52:11 -0400 Received: from web279.dogado.net ([31.47.255.59]) by node02.secure-mailgate.com with esmtps (TLS1.2) tls TLS_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1wylx1-00EHW4-AL; Tue, 25 Aug 2026 09:52:08 +0200 Received: from Zeuss.fritz.box (p57b2f393.dip0.t-ipconnect.de [87.178.243.147]) (Authenticated sender: christian@quante.one) by web279.dogado.net (Postfix) with ESMTPSA id 47FE2280CB6; Tue, 25 Aug 2026 09:52:06 +0200 (CEST) X-SecureMailgate-Identity: christian@quante.one;web279.dogado.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quante.one; s=cloudpit; t=1787644327; bh=hScJBLf5JE1ad734WvKcrcUa1hRunhwYrFZJL6aJdy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xM4H1UUhFzHxSmx3om0YjHhjslpjtO4jAJE7Q19/ICQaKAcVCEZ/VYnIYL84sHTpZ MSsvlH7gLfafxV38DlEviD22l3DZU0+C9+vHDSoI4kvnjeI1qeZLRVV4ut+ppN7h7x 6IcObNxWIoCCd42qN8d5nBVbrHQi4HouMYjcBjeE= X-SecureMailgate-Identity: christian@quante.one;web279.dogado.net From: Christian Quante To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Akihiko Odaki , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Christian Quante Subject: [PATCH v2 2/2] hw/input/ps2: say why unknown keyboard commands draw a resend Date: Tue, 25 Aug 2026 09:51:27 +0200 Message-ID: <20260825075127.34876-3-christian@quante.one> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260825075127.34876-1-christian@quante.one> References: <20260825075127.34876-1-christian@quante.one> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-PPP-Message-ID: <178764432706.4156473.14796010202711159407@web279.dogado.net> X-PPP-Vhost: quante.one X-Originating-IP: 31.47.255.59 X-SecureMailgate-Domain: web279.dogado.net X-SecureMailgate-Username: 31.47.255.59 Authentication-Results: secure-mailgate.com; auth=pass smtp.auth=31.47.255.59@web279.dogado.net X-SecureMailgate-Outgoing-Class: ham X-SecureMailgate-Outgoing-Evidence: SB/global_tokens (0.00992241105839) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuXbhZKxo9bsEFD8Kj7cRWyJ3QBAKW1PETXt sam3I5tZbiu2SmbhJN1U9FKs8X3+Nt1HOctZ5X+40a9IXddeG3M38JQYgcgjsac3uQcQdCX4ROfH zJ6mVE7ewsipSVIfs4aLbDVr9n8nIXP/kMcR+6OpS5+h1uiHzk/Rfxfh461YLyu3RZI1CD15pCOE 1vk99RMxqKIdDR6RVaf4xWSq5/wwdOtYechJ/ikE1WgRg4cS6A6B6pTstltS07kaQJ8I9sYal0h7 43VOpKNY+4MjijihZK0EMmf3P50Ajf/tIX00Fuu2beRqilmjgQ6jA3UwYgm3QTha208ypFqQwBFb xm4JX7semJdl8Weuy8+tlMSTQwhoy9D5QZ6a84vJal7pM1XhlAOd290vPXa7Loma0jth+x0iJ0NX 07iZIeUSWePdS+owFPr4kjXuZPwOU47Z9+s09nAWqoDs8zZa/KiCJd90Lk7053RUfwPXoECB9OvJ bEB3ZiIyIjwOoMnQjl6CrKp8EdZ8SizDtPkcGuerFSnVOYtq+HE3WG85mIDi374DW/icy5el5aWU /wf4ShFNzAzxuUotuUNGy5ExxW0GC5CkQjQ6zWGsvxsVC/m+yny0Rue4mmnjPFy3dPHP2FzOds3E 46oSR4SMslNlGoPN/ReRDyx85JvPA3M+w5jBayuCMVamoWktV59525k34keYykbMQrAIKOj+9hX4 DXX27MdKse0EuSSr7btxBu5GkHP0MO/iDzcBQTphqKbEazY5fbVoh9VoIekQHpwUfpYnEThmBYJb VMG52ZGVwnbZoccL6igIeMz3MSv4B3x/z73En6W2sqBJqpK1GG6vy7Bj1AGPtF7Ey5dhohH1DJe4 xKbBicPC1/Rnj77R/+sTEK1dN5vsJ9kuQgio2RjilK0QWzDS9OQPoavkwPMV2SuvcnEWOuw2MxX0 5+DV5wYxLp/Q72cFKjFopoBzI+w6TKsrBBDgOPIh4HEPoN/NFnLJ6oXdnjOfbpfTHUB7Gt5iiSuf 1AqE4RUbbmt6iPMBsUv9RZcAqvUAApbMLAQDq1Y3RVkolMgdqFY8KQ9Egxp4UGe16U/eGVjath4b vkom8c4V/PtEw6nIoDr0sXUZ7YZoZ/GZ+g6r2+bdtWXb1z9s4uNhgHLX+AZlS2zN461BhwVoVaJE tlw222OyNqTeU9tH1jYC/i8C7bWQrrnqtP27In+yOBOqEi1X3qoM14sIpnfztEwQP0Uw9n8VcNp0 5ACBU/pi9Ze6aNYZYil6cObjel6n0jQ= X-Report-Abuse-To: spam@node04.secure-mailgate.com X-Complaints-To: abuse@node01.secure-mailgate.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=192.162.87.206; envelope-from=christian@quante.one; helo=nx206.node02.secure-mailgate.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @quante.one) X-ZM-MESSAGEID: 1787644363872158500 Content-Type: text/plain; charset="utf-8" The keyboard path has answered unknown commands with KBD_REPLY_RESEND since commit 06b3611fc2a3 ("ps2: reject unknown commands, instead of blindly accepting them"), but never said why. Give it the comment the mouse path just gained, so the reasoning is written down in both places. Suggested-by: Akihiko Odaki Signed-off-by: Christian Quante Reviewed-by: Akihiko Odaki Reviewed-by: Marc-Andr=C3=A9 Lureau --- hw/input/ps2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index e8300d2d83..01af4350b3 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -647,6 +647,10 @@ void ps2_write_keyboard(PS2KbdState *s, int val) ps2_cqueue_1(ps2, KBD_REPLY_ACK); break; default: + /* + * A PS/2 device answers every command it is given; an unknown + * one draws a resend. + */ ps2_cqueue_1(ps2, KBD_REPLY_RESEND); break; } --=20 2.53.0