From patchwork Mon Aug 15 17:48:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Sorokin X-Patchwork-Id: 9281729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E2226607FD for ; Mon, 15 Aug 2016 17:49:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D683B28E14 for ; Mon, 15 Aug 2016 17:49:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB5EE28E17; Mon, 15 Aug 2016 17:49:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 282B228E14 for ; Mon, 15 Aug 2016 17:49:14 +0000 (UTC) Received: from localhost ([::1]:38287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZM0g-00086F-2s for patchwork-qemu-devel@patchwork.kernel.org; Mon, 15 Aug 2016 13:49:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZM0F-0007xx-OL for qemu-devel@nongnu.org; Mon, 15 Aug 2016 13:48:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bZM0D-0005Md-Sb for qemu-devel@nongnu.org; Mon, 15 Aug 2016 13:48:46 -0400 Received: from forward6p.cmail.yandex.net ([87.250.241.191]:55704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bZM07-0005He-9K; Mon, 15 Aug 2016 13:48:40 -0400 Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [95.108.131.191]) by forward6p.cmail.yandex.net (Yandex) with ESMTP id 676BF21255; Mon, 15 Aug 2016 20:48:27 +0300 (MSK) Received: from smtp2j.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2j.mail.yandex.net (Yandex) with ESMTP id B49841060C31; Mon, 15 Aug 2016 20:48:25 +0300 (MSK) Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0JZEHn2Nch-mOXKcT0c; Mon, 15 Aug 2016 20:48:24 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1471283304; bh=xevefoThVxOBeyFHV5lCTkpoDrJzfsip/VC9pspU+N4=; h=From:To:Cc:Subject:Date:Message-Id; b=DCiTuFe9/Rq84SKk/9yciuXL2BCIa4oWyBzopsaF+pbGhKtBXk9Gz+eWqTWw6PDIJ rB1QcbJHmLrUls4x2yR+vJLcXFGbYoUxROKldPe5IpPy7UO8fIRA2Wa1g+JfYztjC/ TPM5xgndZAT4tRswDfALEuxT4g0E8ie6D+1j1ezU= Authentication-Results: smtp2j.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0,1 0,1 0,1 37377968 From: Sergey Sorokin To: qemu-devel@nongnu.org Date: Mon, 15 Aug 2016 20:48:13 +0300 Message-Id: <1471283293-169850-1-git-send-email-afarallax@yandex.ru> X-Mailer: git-send-email 1.9.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 87.250.241.191 Subject: [Qemu-devel] [PATCH] target-arm: Fix lpae bit in FSR on an alignment fault 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: Peter Maydell , qemu-arm@nongnu.org, Sergey Sorokin Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP If an alignment fault occurred and target EL is using AArch32, then DFSR/IFSR bit LPAE[9] must be set correctly. Signed-off-by: Sergey Sorokin Reviewed-by: Peter Maydell --- target-arm/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 3e8588e..be27b21 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -194,7 +194,7 @@ void arm_cpu_do_unaligned_access(CPUState *cs, vaddr vaddr, * the LPAE long descriptor format, or the short descriptor format */ if (arm_s1_regime_using_lpae_format(env, cpu_mmu_index(env, false))) { - env->exception.fsr = 0x21; + env->exception.fsr = (1 << 9) | 0x21; } else { env->exception.fsr = 0x1; }