From patchwork Tue Aug 29 00:14:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 111181 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp571421qge; Mon, 28 Aug 2017 18:01:01 -0700 (PDT) X-Received: by 10.55.170.134 with SMTP id t128mr3719495qke.230.1503968461927; Mon, 28 Aug 2017 18:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503968461; cv=none; d=google.com; s=arc-20160816; b=UeoSd/Mnav07UJSkf2+2x5zOzjnKlRG+GR0k0L7HAMpoFVsSAqFYbVHH8oe3xV7/hN KnXy+srlFsoXR1QAOHGRy/fz+fjf7Ngw1XTse19QjMIWGCwNhkImXPqjhT0xML0BDrnx ftVzc9nZFjPftRqzgzCWjjz0+VKlI1it5SRx6vMX7Mxj8wc7S0xgh9p33ExfrOh5rS3K B/knjhaROkLmv0jyv1P5ColZtUa5BFFqF+jrpkQ/mdPHzD37UktB+mtswYnD6m8iCilg uavq4bajtS/1GWpl/BJfRmOBsJEZERyaZ5kBdopPnpspbSA2Lbb1DmyZuBbFpfOr0yrz p9Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:references :in-reply-to:date:to:from:arc-authentication-results; bh=3tEmZ2eBw/7OxnQpoZ2ruSHwife+SIaJ2jT/GCqKbag=; b=Z4gz33sCYpp9jjQ/x+3kJJ/tCXKyOOoB0Bfr3p6UmviNolJHX+3YptgjEo/u+gzTx4 zsQ+j39s0exHjnXwIEkazULXLThcC1ePpikFtAyJoIC8gLZaGxH5N6371zTcvehaOFBh Dq+b9VH3C41v0jzBrVKJ/sXsOQCL9uE2bNUujRts+Lc+T7wjsvlKC36RvhUYrgOXUjLD yZXDFiFDArSowQXfgWRoRRo/YnZzWFcqRUjMOnPbhAj8UdWxUPyTClPvlMZPahnJYdda Hv6F8k/TSE3IZiSEN1QWjKLQMetkIgw6mAvAgnuSG1y7iMpxPLCmkFIZSLlkyC+O/NyZ WcGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id x10si1760944qkx.252.2017.08.28.18.01.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 28 Aug 2017 18:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from localhost ([::1]:42139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmUtn-0007gE-PU for patch@linaro.org; Mon, 28 Aug 2017 21:00:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmUCq-0001kl-VN for qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmUCn-0006A3-OJ for qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:36 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:45217) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmUCn-00067V-El for qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:33 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7T0E8Wc041818 for ; Mon, 28 Aug 2017 20:16:32 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 2cmur4vq5b-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 28 Aug 2017 20:16:32 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 28 Aug 2017 18:16:31 -0600 Received: from b03cxnp07028.gho.boulder.ibm.com (9.17.130.15) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 28 Aug 2017 18:16:28 -0600 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v7T0GSLn4129216; Mon, 28 Aug 2017 17:16:28 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B5306E03F; Mon, 28 Aug 2017 18:16:28 -0600 (MDT) Received: from localhost (unknown [9.80.85.217]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 18BA86E03D; Mon, 28 Aug 2017 18:16:28 -0600 (MDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 28 Aug 2017 19:14:41 -0500 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503965694-10794-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1503965694-10794-1-git-send-email-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17082900-0004-0000-0000-000012D6D52D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007630; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000226; SDB=6.00909028; UDB=6.00455849; IPR=6.00689279; BA=6.00005557; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016909; XFM=3.00000015; UTC=2017-08-29 00:16:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17082900-0005-0000-0000-000080E59EB7 Message-Id: <1503965694-10794-67-git-send-email-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-28_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708290001 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 66/79] hid: Reset kbd modifiers on reset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , qemu-stable@nongnu.org, Alexander Graf Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alexander Graf When resetting the keyboard, we need to reset not just the pending keystrokes, but also any pending modifiers. Otherwise there's a race when we're getting reset while running an escape sequence (modifier 0x100). Cc: qemu-stable@nongnu.org Signed-off-by: Alexander Graf Message-id: 1498117295-162030-1-git-send-email-agraf@suse.de Signed-off-by: Gerd Hoffmann (cherry picked from commit 51dbea77a29ea46173373a6dad4ebd95d4661f42) Signed-off-by: Michael Roth --- hw/input/hid.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/hw/input/hid.c b/hw/input/hid.c index fa9cc4c..a0892e8 100644 --- a/hw/input/hid.c +++ b/hw/input/hid.c @@ -483,6 +483,7 @@ void hid_reset(HIDState *hs) memset(hs->kbd.keycodes, 0, sizeof(hs->kbd.keycodes)); memset(hs->kbd.key, 0, sizeof(hs->kbd.key)); hs->kbd.keys = 0; + hs->kbd.modifiers = 0; break; case HID_MOUSE: case HID_TABLET: From patchwork Tue Aug 29 00:14:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 111182 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp579578qge; Mon, 28 Aug 2017 18:08:41 -0700 (PDT) X-Received: by 10.200.28.29 with SMTP id a29mr3658179qtk.318.1503968921413; Mon, 28 Aug 2017 18:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503968921; cv=none; d=google.com; s=arc-20160816; b=uxhIoloJoC5FMpzgJCHkhhhbQKASdKgeCa3qioflfu0qJXihp3Y8Q8NkqAHdX+pwOd VRn7v6NcBDbYq7nQsQK72RQRWhG57JBG8DZ4Es8VHeSa7kfERY2GzRFNRAasH6JSSRQW cFVcFVTY9LRzs4BlkDbQtH93ZzFxWRW5W5as2mjgksD+t3Wz006eqsiJKHs19srt19z5 lNQu+/ebMW/mpQNCbVcjvIjKIHUA0YJ1N90DnvwFst3hcEeEeo+Jsz3M1B3Nr8N2kZyS YdyriNUuFuHm7V8YCff8WzxoJCQTIKt2VBnQWoviHDUR9oilXA+P/p/OPM/erio4hXNO LoEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:references :in-reply-to:date:to:from:arc-authentication-results; bh=v6TknjM5e/9dKJg7XC+ccEuI8lXQhVvV7SQy0UwldJQ=; b=eeh01P/BLaKJ8Kgcr1qEBsdR1je6TRgnpI9D37jrmLxbTr8Nx3wHKAr7a1K38gaGpd QTEwpGaIDB3V4Qr41PppMo0oZQxqKlCPVAD5DaQPIGyvE65sDqCJbfp+P0opfgeuEgPW Yw/pFtNfDW55oIpJrS0CxsvESZkWCv4FR9RSloMYEDem2tEE1B4Fc59lxAjWTHYS73E3 SPSIyzDI8JJXG4JDIt6SzRlLg2fAI5Jo7ZHj3tIabOa1zg5lIG7kL4XQQEbqDLfk2kAq 1Wxl8Jy0jjtM9nQjSIyO7R5Ou0c9PPKREezjX3yVgwvtJIHeD7FBkB6feHWCqa331MIj mBtQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 95si1700603qkv.301.2017.08.28.18.08.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 28 Aug 2017 18:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from localhost ([::1]:42182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmV1D-0005ft-8E for patch@linaro.org; Mon, 28 Aug 2017 21:08:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmUCv-0001rH-8d for qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmUCs-0006IA-2u for qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:41 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34270 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmUCr-0006HR-Tq for qemu-devel@nongnu.org; Mon, 28 Aug 2017 20:16:37 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7T0E8wK043828 for ; Mon, 28 Aug 2017 20:16:37 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2cmu3kpetr-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 28 Aug 2017 20:16:37 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 28 Aug 2017 20:16:36 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 28 Aug 2017 20:16:34 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v7T0GYFj23593182; Tue, 29 Aug 2017 00:16:34 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F632AC03F; Mon, 28 Aug 2017 20:16:58 -0400 (EDT) Received: from localhost (unknown [9.80.85.217]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 373B4AC03A; Mon, 28 Aug 2017 20:16:58 -0400 (EDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 28 Aug 2017 19:14:48 -0500 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503965694-10794-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1503965694-10794-1-git-send-email-mdroth@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17082900-0040-0000-0000-00000396DF12 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007630; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000226; SDB=6.00909028; UDB=6.00455849; IPR=6.00689279; BA=6.00005557; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016909; XFM=3.00000015; UTC=2017-08-29 00:16:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17082900-0041-0000-0000-0000078B1093 Message-Id: <1503965694-10794-74-git-send-email-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-28_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708290001 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH 73/79] input: Decrement queue count on kbd delay X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , qemu-stable@nongnu.org, Alexander Graf Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alexander Graf Delays in the input layer are special cased input events. Every input event is accounted for in a global intput queue count. The special cased delays however did not get removed from the queue, leading to queue overruns and thus silent key drops after typing quite a few characters. Signed-off-by: Alexander Graf Message-id: 1498117318-162102-1-git-send-email-agraf@suse.de Fixes: be1a7176 ("input: add support for kbd delays") Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann (cherry picked from commit 77b0359bf414ad666d1714dc9888f1017c08e283) Signed-off-by: Michael Roth --- ui/input.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 diff --git a/ui/input.c b/ui/input.c index fb1f404..94ba3d5 100644 --- a/ui/input.c +++ b/ui/input.c @@ -252,6 +252,7 @@ static void qemu_input_queue_process(void *opaque) item = QTAILQ_FIRST(queue); g_assert(item->type == QEMU_INPUT_QUEUE_DELAY); QTAILQ_REMOVE(queue, item, node); + queue_count--; g_free(item); while (!QTAILQ_EMPTY(queue)) {