Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/833391/?format=api
{ "id": 833391, "url": "http://patchwork.ozlabs.org/api/1.2/patches/833391/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1509634273-29111-1-git-send-email-peter.maydell@linaro.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<1509634273-29111-1-git-send-email-peter.maydell@linaro.org>", "list_archive_url": null, "date": "2017-11-02T14:51:13", "name": "cpu-exec: Exit exclusive region on longjmp from step_atomic", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "7dbb57b204a523191a1a636309bb09f137d51b01", "submitter": { "id": 5111, "url": "http://patchwork.ozlabs.org/api/1.2/people/5111/?format=api", "name": "Peter Maydell", "email": "peter.maydell@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1509634273-29111-1-git-send-email-peter.maydell@linaro.org/mbox/", "series": [ { "id": 11523, "url": "http://patchwork.ozlabs.org/api/1.2/series/11523/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=11523", "date": "2017-11-02T14:51:13", "name": "cpu-exec: Exit exclusive region on longjmp from step_atomic", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/11523/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/833391/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/833391/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>)", "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 3ySShS0v9jz9sNw\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 3 Nov 2017 01:51:19 +1100 (AEDT)", "from localhost ([::1]:60626 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 1eAGpw-0000IC-Sg\n\tfor incoming@patchwork.ozlabs.org; Thu, 02 Nov 2017 10:51:16 -0400", "from eggs.gnu.org ([2001:4830:134:3::10]:44737)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pm215@archaic.org.uk>) id 1eAGpU-0000Gi-T1\n\tfor qemu-devel@nongnu.org; Thu, 02 Nov 2017 10:50:49 -0400", "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pm215@archaic.org.uk>) id 1eAGpU-0005Bg-0N\n\tfor qemu-devel@nongnu.org; Thu, 02 Nov 2017 10:50:48 -0400", "from orth.archaic.org.uk ([2001:8b0:1d0::2]:38120)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pm215@archaic.org.uk>)\n\tid 1eAGpT-0005BH-P2\n\tfor qemu-devel@nongnu.org; Thu, 02 Nov 2017 10:50:47 -0400", "from pm215 by orth.archaic.org.uk with local (Exim 4.89)\n\t(envelope-from <pm215@archaic.org.uk>)\n\tid 1eAGpQ-0002tS-IZ; Thu, 02 Nov 2017 14:50:44 +0000" ], "From": "Peter Maydell <peter.maydell@linaro.org>", "To": "qemu-devel@nongnu.org", "Date": "Thu, 2 Nov 2017 14:51:13 +0000", "Message-Id": "<1509634273-29111-1-git-send-email-peter.maydell@linaro.org>", "X-Mailer": "git-send-email 2.7.4", "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.", "X-Received-From": "2001:8b0:1d0::2", "Subject": "[Qemu-devel] [PATCH] cpu-exec: Exit exclusive region on longjmp\n\tfrom step_atomic", "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>", "Cc": "\"Emilio G . Cota\" <cota@braap.org>, =?utf-8?q?Alex_Benn=C3=A9e?=\n\t<alex.bennee@linaro.org>, \tRichard Henderson <rth@twiddle.net>", "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": "Commit ac03ee5331612e44be narrowed the scope of the exclusive\nregion so it only covers when we're executing the TB, not when\nwe're generating it. However it missed that there is more than\none execution path out of cpu_tb_exec -- if the atomic insn\ncauses an exception then the code will longjmp out, skipping\nthe code to end the exclusive region. This causes QEMU to hang\nthe next time the CPU calls start_exclusive(), waiting for\nitself to exit the region.\n\nMove the \"end the region\" code out to the end of the\nfunction so that it is run for both normal exit and also\nfor exit-via-longjmp.\n\n(For some reason this only reproduces for me with a clang\noptimized build, not a gcc debug build.)\n\nFixes: ac03ee5331612e44beb393df2b578c951d27dc0d\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\n---\n accel/tcg/cpu-exec.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)", "diff": "diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c\nindex 4318441..ac316bb 100644\n--- a/accel/tcg/cpu-exec.c\n+++ b/accel/tcg/cpu-exec.c\n@@ -256,9 +256,6 @@ void cpu_exec_step_atomic(CPUState *cpu)\n trace_exec_tb(tb, pc);\n cpu_tb_exec(cpu, tb);\n cc->cpu_exec_exit(cpu);\n- parallel_cpus = true;\n-\n- end_exclusive();\n } else {\n /* We may have exited due to another problem here, so we need\n * to reset any tb_locks we may have taken but didn't release.\n@@ -270,6 +267,9 @@ void cpu_exec_step_atomic(CPUState *cpu)\n #endif\n tb_lock_reset();\n }\n+\n+ parallel_cpus = true;\n+ end_exclusive();\n }\n \n struct tb_desc {\n", "prefixes": [] }