Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/909798/?format=api
{ "id": 909798, "url": "http://patchwork.ozlabs.org/api/patches/909798/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20180507150303.7486B381924@moya.office.hostfission.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180507150303.7486B381924@moya.office.hostfission.com>", "list_archive_url": null, "date": "2018-05-07T13:01:46", "name": "[PATCHv3,1/2] ps2: Clear the PS/2 queue and obey disable", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1f8c9c810e4c469812941446b7702fc8bf3358a0", "submitter": { "id": 71296, "url": "http://patchwork.ozlabs.org/api/people/71296/?format=api", "name": "Cameron Esfahani via", "email": "qemu-devel@nongnu.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20180507150303.7486B381924@moya.office.hostfission.com/mbox/", "series": [ { "id": 42971, "url": "http://patchwork.ozlabs.org/api/series/42971/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=42971", "date": "2018-05-07T13:01:46", "name": "[PATCHv3,1/2] ps2: Clear the PS/2 queue and obey disable", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/42971/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/909798/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/909798/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=nongnu.org", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=hostfission.com header.i=@hostfission.com\n\theader.b=\"DNbbWS4j\"; dkim-atps=neutral" ], "Received": [ "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 40fm9J3S5vz9s34\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 8 May 2018 01:04:04 +1000 (AEST)", "from localhost ([::1]:46680 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1fFhgI-0006zU-2y\n\tfor incoming@patchwork.ozlabs.org; Mon, 07 May 2018 11:04:02 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:34945)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <geoff@hostfission.com>) id 1fFhfX-0006wC-55\n\tfor qemu-devel@nongnu.org; Mon, 07 May 2018 11:03:19 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <geoff@hostfission.com>) id 1fFhfN-0008Nj-QE\n\tfor qemu-devel@nongnu.org; Mon, 07 May 2018 11:03:15 -0400", "from mail1.hostfission.com ([139.99.139.48]:51160)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <geoff@hostfission.com>) id 1fFhfN-0008M2-Ea\n\tfor qemu-devel@nongnu.org; Mon, 07 May 2018 11:03:05 -0400", "from moya.office.hostfission.com (office.hostfission.com\n\t[158.140.217.90])\n\tby mail1.hostfission.com (Postfix) with ESMTP id 8D54741ED8;\n\tTue, 8 May 2018 01:03:03 +1000 (AEST)", "by moya.office.hostfission.com (Postfix, from userid 0)\n\tid 7486B381924; Tue, 8 May 2018 01:03:03 +1000 (AEST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=hostfission.com;\n\ts=mail; t=1525705383;\n\tbh=cjoICs+ynQia+U/rnSky2kP8SjZr6USNRV62Fto7wKA=;\n\th=From:Date:Subject:To:From;\n\tb=DNbbWS4jhxYFTu4hVwPzGtjXDiUAwWnLMC1XPWss3O6uf7tepeK0DAzeT0FQyPQrH\n\tcQKjpE2Rn+rUKp7VPD5IdP+h4kR4beuQ4TH+RP9hHVDgUkeQlgZLFsZjbOipq7mR7J\n\tzTL8suVkGIC8KDkWw9gyJcPRSp2gqjV2SJlNWss8=", "Date": "Mon, 7 May 2018 23:01:46 +1000", "To": "qemu-devel@nongnu.org,\n Gerd Hoffmann <kraxel@redhat.com>", "Message-Id": "<20180507150303.7486B381924@moya.office.hostfission.com>", "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]", "X-Received-From": "139.99.139.48", "Subject": "[Qemu-devel] [PATCHv3 1/2] ps2: Clear the PS/2 queue and obey\n\tdisable", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.21", "Precedence": "list", "List-Id": "<qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "From": "Geoffrey McRae via Qemu-devel <qemu-devel@nongnu.org>", "Reply-To": "Geoffrey McRae <geoff@hostfission.com>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "This allows guest's to correctly reinitialize and identify the mouse\nshould the guest decide to re-scan or reset during mouse input events.\n\nWhen the guest sends the \"Identify\" command, due to the PC's hardware\narchitecutre it is impossible to reliably determine the response from\nthe command amongst other streaming data, such as mouse or keyboard\nevents. Standard practice is for the guest to disable the device and\nthen issue the identify command, so this must be obeyed.\n\nSigned-off-by: Geoffrey McRae <geoff@hostfission.com>\n---\n hw/input/ps2.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)", "diff": "diff --git a/hw/input/ps2.c b/hw/input/ps2.c\nindex 06f5d2ac4a..4abc8cecdd 100644\n--- a/hw/input/ps2.c\n+++ b/hw/input/ps2.c\n@@ -232,6 +232,11 @@ static void ps2_keyboard_event(DeviceState *dev, QemuConsole *src,\n uint16_t keycode = 0;\n int mod;\n \n+ /* do not process events while disabled to prevent stream corruption */\n+ if (!s->scan_enabled) {\n+ return;\n+ }\n+\n qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);\n assert(evt->type == INPUT_EVENT_KIND_KEY);\n qcode = qemu_input_key_value_to_qcode(key->key);\n@@ -673,6 +678,11 @@ static void ps2_mouse_sync(DeviceState *dev)\n {\n PS2MouseState *s = (PS2MouseState *)dev;\n \n+ /* do not sync while disabled to prevent stream corruption */\n+ if (!(s->mouse_status & MOUSE_STATUS_ENABLED)) {\n+ return;\n+ }\n+\n if (s->mouse_buttons) {\n qemu_system_wakeup_request(QEMU_WAKEUP_REASON_OTHER);\n }\n@@ -776,6 +786,7 @@ void ps2_write_mouse(void *opaque, int val)\n s->mouse_resolution = 2;\n s->mouse_status = 0;\n s->mouse_type = 0;\n+ ps2_reset_queue(&s->common);\n ps2_queue(&s->common, AUX_ACK);\n ps2_queue(&s->common, 0xaa);\n ps2_queue(&s->common, s->mouse_type);\n", "prefixes": [ "PATCHv3", "1/2" ] }