From patchwork Mon Jul 10 15:47:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 107308 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3596531qge; Mon, 10 Jul 2017 08:51:02 -0700 (PDT) X-Received: by 10.237.46.99 with SMTP id j90mr5539959qtd.76.1499701862621; Mon, 10 Jul 2017 08:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499701862; cv=none; d=google.com; s=arc-20160816; b=yUKfKBt7PIXiWPKc+AMtAeRlHeHW9KB9J/hIJ1+90Kp30VAhAFEoYs7SeKFBgrwcmb 4dwBFz2yXmAeNER5Hzv4oXYeun6fifONEF0uA4LiBA0iLCVh9SUlLf1MzVGdVSu9fBJU Tslcme5EDenWOJwHKS/Lyome3W25f5W30kk/7dGYB9y3XXz/uSfn4/tl5CjhjibRzijS RR5TIZoXKAbQwlBh/1B52PY6r7A3BgOjyniT0N9nWre356u9MiEI8St1l/ojzXSce3wc PvBrDhHwsMcq/UJOu/5PSLQqOAjM5EuL5ZuE1b4fCdIhJg/gNnTOSxE7BCZ/D48x3rwN NxoA== 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 :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=GDHOOG83TGexdww0248zv4VQN1JAogr/M1FF5yH+GrY=; b=ixRP+28R7AHI2N3d7JvOqyF5RgkQKKUrjQDdQR4xS2CW6yUi+QxUwZtypOQ1AARqrA ZBgDLtFyZ3cASVHLPGNSUP8hPYehuy0Qe/cVv1mFNWyt+A2ttnok4dXuX67Q+kBixT99 bv0fEOSL42tFp47XaSaBRZb4rp9Trr6+Fvbhw83Yvk7UJQC+tGTEE7eqcPAU3J90zrgM J/d0ApDraMQQHQeOo6X8HpsDBtSIg2HWfwBhxdj+8VEMjZ3O+mdSF37nZD831sC0r41G BrjBSSfU4j9hZ5RBnRIQmREAB56uNaDkKDmcZp6TJlpMOIygJkBFTAFfmrS7SogIs5/L aTEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.b=HWc87uaW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id i127si10995166qkc.370.2017.07.10.08.51.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 10 Jul 2017 08:51:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.b=HWc87uaW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUaxf-0007ul-Ey for patch@linaro.org; Mon, 10 Jul 2017 11:50:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUavg-0006f7-1D for qemu-devel@nongnu.org; Mon, 10 Jul 2017 11:48:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUavc-00047S-TN for qemu-devel@nongnu.org; Mon, 10 Jul 2017 11:48:56 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:33106) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUavc-000475-Mb for qemu-devel@nongnu.org; Mon, 10 Jul 2017 11:48:52 -0400 Received: by mail-wr0-f172.google.com with SMTP id r103so144217908wrb.0 for ; Mon, 10 Jul 2017 08:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GDHOOG83TGexdww0248zv4VQN1JAogr/M1FF5yH+GrY=; b=HWc87uaWiMZvT0JkSNzQdLno5EQWhrmg3xPfF/BJIJ5NesgqgdyGCQ+Sj8PaCG8Lxz G7Ca1DjBhtDcjyOGKWyZrprCBFX+Kjkxmr4bIiao+QapJvrEoqaueCFVj/d9NCVrQKQo yy99c4+xRE9Y6r7xmBPfFf7cdFi7Gcr5pmdPo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GDHOOG83TGexdww0248zv4VQN1JAogr/M1FF5yH+GrY=; b=Gzgvp12QJk4b5/Yj8YeS7C0bM9NdUhrW6k0uU1BIUlwKN3daUhPbqZhjPTHTjukR4C lfgGwZrXLlCcYK0Uppfo3a4Vn26Y/ggNZZ0VbHfdLv6HsWWhZKDJhY9sQPn1y0LlrsI/ ivEDnuYcIwmphIM6xkCkxZp0WYKb40EEFco4kqQSuvX9aWeGd8HckJpTSEpGBw7DpXst gtAVcx40du/Vv7n+qq9McL74p0KKdqwwyd1jAI8n/DO22FpnbbDfX9L+kiEgl+D61K9w 22/zf3t4TssMk57m4IEk65BYiiS3o12Esi+Z8Of+WxTPirKfIhHAiIdj2ZAb55qONWKt jhEA== X-Gm-Message-State: AIVw112RwK7CRATwroEWEu7ixgeaTIV8p5tSI/iVSJLpRBNpvUSEpyx4 x9s78ZktwSP/0kUt X-Received: by 10.28.19.201 with SMTP id 192mr8207216wmt.123.1499701671406; Mon, 10 Jul 2017 08:47:51 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r132sm2696345wma.27.2017.07.10.08.47.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jul 2017 08:47:49 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 475633E014F; Mon, 10 Jul 2017 16:47:49 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, cota@braap.org Date: Mon, 10 Jul 2017 16:47:43 +0100 Message-Id: <20170710154749.13624-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.128.172 Subject: [Qemu-devel] [PATCH v1 0/6] DISAS_UPDATE fixes for eret 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, This is a follow-up to the eret patch I posted on Friday: https://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg01831.html It fixes the same bug but does it in a slightly more holistic way. We start by expanding the commentary on the common DISAS_n exit flags in exec-all.h. I then update ARMs usage of DISAS_UPDATE to: - explicitly exit the run-loop (and not fall-through to DISAS_JUMP) - make setting the PC optional (as helpers may set it) I then get rid of the architecture specific hack DISAS_EXIT and use DISAS_UPDATE for all the eret paths. Please review. Alex Bennée (6): include/exec/exec-all: document common exit conditions target/arm/translate.c: make DISAS_UPDATE match declared semantics target/arm/translate-a64: make DISAS_UPDATE match declared semantics target/arm/translate-a64: get rid of DISAS_EXIT target/arm: use DISAS_JUMP for ISB handling target/arm: ensure eret exits the run-loop via DISAS_UPDATE include/exec/exec-all.h | 29 ++++++++++++++++++++++++++--- target/arm/translate-a64.c | 21 +++++++++++---------- target/arm/translate.c | 36 ++++++++++++++++++++++++++---------- target/arm/translate.h | 4 ---- 4 files changed, 63 insertions(+), 27 deletions(-) -- 2.13.0