From patchwork Tue May 19 18:33:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 48764 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7BB5F2121F for ; Tue, 19 May 2015 18:33:42 +0000 (UTC) Received: by wgbgf7 with SMTP id gf7sf7173597wgb.2 for ; Tue, 19 May 2015 11:33:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=gsG31fV9xJCtV7XUqc/MQpSidbw0qzzK3y9jXbMI0Nw=; b=kqD9WCmvn+6/YlQta08QSPtPrEGZ1rNVGlYJTDfdBplWh5CJzLhdzwEPvOI2eeGPTb lBr50YpzeTaKrMHSeKyV43Bh+4ArO3GDuGqsJCW/OeUffjZ15quC/AazVKm+yad+M+wm p5Jg9KkuJsfnAn/zznPx/+ts94W2I4XyuIXAxZpv6z5CKG0q0Y36X1vGuvl22KtWauP4 qiNrttAcuJq30SO9lUgXnG+JSTrMxeqCXWG5ozNYeUZOtiLcG9TldYJBkfMzJ93ksDU0 uvf0m0OlPOTvL42c35Q+YkKNHUxkrqY2F8PJ3JxVQY+ak1b+kAC4KY0oNqpv/THMWqT4 Twjg== X-Gm-Message-State: ALoCoQlnreU+tAzknOMIWoIn0UZ5WDE0ygo4nyolkcl8bN3laO2TvYQ7HPWlcBz7fCUapCsQNsUx X-Received: by 10.152.4.230 with SMTP id n6mr3188450lan.2.1432060421723; Tue, 19 May 2015 11:33:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.196 with SMTP id u4ls101802lau.6.gmail; Tue, 19 May 2015 11:33:41 -0700 (PDT) X-Received: by 10.112.136.166 with SMTP id qb6mr8009987lbb.54.1432060421585; Tue, 19 May 2015 11:33:41 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id pc6si9578476lbc.178.2015.05.19.11.33.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 May 2015 11:33:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labbd9 with SMTP id bd9so38640877lab.2 for ; Tue, 19 May 2015 11:33:41 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr13781859laa.106.1432060421508; Tue, 19 May 2015 11:33:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp992866lbb; Tue, 19 May 2015 11:33:41 -0700 (PDT) X-Received: by 10.112.64.193 with SMTP id q1mr22506469lbs.11.1432060418693; Tue, 19 May 2015 11:33:38 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id uh8si9579017lac.136.2015.05.19.11.33.37 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 19 May 2015 11:33:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YumKc-0001MS-Bx; Tue, 19 May 2015 19:33:34 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, alex.bennee@linaro.org, agraf@suse.de, serge.fdrv@gmail.com, edgar.iglesias@xilinx.com Subject: [PATCH 03/14] target-arm: Set correct syndrome for faults on MSR DAIF*, imm Date: Tue, 19 May 2015 19:33:23 +0100 Message-Id: <1432060414-5195-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1432060414-5195-1-git-send-email-peter.maydell@linaro.org> References: <1432060414-5195-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If the SCTLR.UMA trap bit is set then attempts by EL0 to update the PSTATE DAIF bits via "MSR DAIFSet, imm" and "MSR DAIFClr, imm" instructions will raise an exception. We were failing to set the syndrome information for this exception, which meant that it would be reported as a repeat of whatever the previous exception was. Set the correct syndrome information. Signed-off-by: Peter Maydell --- target-arm/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 43e3457..5af4a0e 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -381,6 +381,9 @@ void HELPER(msr_i_pstate)(CPUARMState *env, uint32_t op, uint32_t imm) */ if (arm_current_el(env) == 0 && !(env->cp15.sctlr_el[1] & SCTLR_UMA)) { env->exception.target_el = exception_target_el(env); + env->exception.syndrome = syn_aa64_sysregtrap(0, extract32(op, 0, 3), + extract32(op, 3, 3), 4, + 0x1f, imm, 0); raise_exception(env, EXCP_UDEF); }