From nobody Tue Feb 10 07:42:47 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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=1621078846; cv=none; d=zohomail.com; s=zohoarc; b=PXaj7uHYe+VyBBafKHNphFnK6npO0rqDTXIGUrSKvBdjbNOC20iLx9cyh7rD/vDwQzPZ1yZbbdLMYvS9Edb6GQilhSt4vH8VZ/by1BKT8BW0VpGRPlF5WOYb5WqSGdpoMqjzI3LO2eHmzn4GzZ/2ghAyt3kBjgXDmQhmG73cWhw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621078846; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Xkacrdnoj8LDt1cSs/9F5ap0f+v01n2SBkNGCHzpaic=; b=MJVz0JrLHzR6ZRnUdSraDxi8vq/ALr3+q3X128ITg9ees8TrKNOPhmdS5f6qNjR+04lK5kDqEu5zv7zF06dMLxahnHmmOZ4UTQya4iZJB5raenQa2m3+tmmD0toRpDBYqxR34p9IxFuUBOjB53JizxsoBtGXfJy0Gdbq9PkNdlI= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16210788460271.4598425962634565; Sat, 15 May 2021 04:40:46 -0700 (PDT) Received: from localhost ([::1]:34114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhsez-0003mc-2G for importer@patchew.org; Sat, 15 May 2021 07:40:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsXn-0004Kk-VJ for qemu-devel@nongnu.org; Sat, 15 May 2021 07:33:20 -0400 Received: from mailout04.t-online.de ([194.25.134.18]:42152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhsXm-0003P8-9e for qemu-devel@nongnu.org; Sat, 15 May 2021 07:33:19 -0400 Received: from fwd37.aul.t-online.de (fwd37.aul.t-online.de [172.20.27.137]) by mailout04.t-online.de (Postfix) with SMTP id 7BF93CC71; Sat, 15 May 2021 13:33:10 +0200 (CEST) Received: from linpower.localnet (G-BJ-oZGghkBfy4nzh2RZfztdFYqRyi4oxz-XjSvac7b2Libj9R2ethVlLaqikGgXe@[79.208.18.63]) by fwd37.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1lhsXR-2NFgm00; Sat, 15 May 2021 13:32:57 +0200 Received: by linpower.localnet (Postfix, from userid 1000) id A563520055D; Sat, 15 May 2021 13:32:54 +0200 (CEST) From: =?UTF-8?q?Volker=20R=C3=BCmelin?= To: "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 02/11] ps2: don't raise an interrupt if queue is full Date: Sat, 15 May 2021 13:32:45 +0200 Message-Id: <20210515113254.6245-2-vr_qemu@t-online.de> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ID: G-BJ-oZGghkBfy4nzh2RZfztdFYqRyi4oxz-XjSvac7b2Libj9R2ethVlLaqikGgXe X-TOI-EXPURGATEID: 150726::1621078377-00013CA1-6079FE62/0/0 CLEAN NORMAL X-TOI-MSGID: b8a0e86b-e487-4b4b-b1cb-d99d2bb016fa 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=lists.gnu.org; Received-SPF: none client-ip=194.25.134.18; envelope-from=volker.ruemelin@t-online.de; helo=mailout04.t-online.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" ps2_queue() behaves differently than the very similar functions ps2_queue_2() to ps2_queue_4(). The first one calls update_irq() even if the queue is full, the others don't. Change ps2_queue() to be consistent with the others. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Volker R=C3=BCmelin --- hw/input/ps2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index d9f79e8260..55a81a0c51 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -212,6 +212,10 @@ void ps2_raise_irq(PS2State *s) =20 void ps2_queue(PS2State *s, int b) { + if (PS2_QUEUE_SIZE - s->queue.count < 1) { + return; + } + ps2_queue_noirq(s, b); s->update_irq(s->update_arg, 1); } --=20 2.26.2