From patchwork Wed Aug 9 19:44:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 9891821 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 5F35E602D7 for ; Wed, 9 Aug 2017 19:48:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 512C828A56 for ; Wed, 9 Aug 2017 19:48:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45CDD28A84; Wed, 9 Aug 2017 19:48:32 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7EF1628A8D for ; Wed, 9 Aug 2017 19:48:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfWuu-0003Db-Nf; Wed, 09 Aug 2017 19:45:20 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfWus-0003D0-TL for xen-devel@lists.xen.org; Wed, 09 Aug 2017 19:45:19 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 9D/7E-01731-E466B895; Wed, 09 Aug 2017 19:45:18 +0000 X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@epam.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1502307917!91083666!1 X-Originating-IP: [40.107.4.56] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1940 invoked from network); 9 Aug 2017 19:45:17 -0000 Received: from mail-eopbgr40056.outbound.protection.outlook.com (HELO EUR03-DB5-obe.outbound.protection.outlook.com) (40.107.4.56) by server-13.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 9 Aug 2017 19:45:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=EPAM.onmicrosoft.com; s=selector1-epam-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ll6hB2qAoanYYa6wCUffhSOV5IZEAOyDvm//Hz3kkKg=; b=jdSyLWxiRBeVOCuiKms1oFB1mDekEq76ZZ/l3EUiKWxPEQA9SEL6Nz/ukUtCUW285y4TBJW7r+u3M1VYWyCgDnLbIjFfLzhUUCtesiCaZgncERt1ubfkx/Ym8D/R/nfoGSn8/0z/jRmzoHF4DeCqGvieSOXp2fQtUydQ4eZZDlI= Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.53) by DB6PR0301MB2136.eurprd03.prod.outlook.com (2603:10a6:4:46::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1320.16; Wed, 9 Aug 2017 19:45:14 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Wed, 09 Aug 2017 22:45:10 +0300 From: Volodymyr Babchuk To: xen-devel@lists.xen.org Date: Wed, 9 Aug 2017 22:44:29 +0300 Message-Id: <1502307870-11317-4-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502307870-11317-1-git-send-email-volodymyr_babchuk@epam.com> References: <1502307870-11317-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.53] X-ClientProxiedBy: DB6PR1001CA0028.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::14) To DB6PR0301MB2136.eurprd03.prod.outlook.com (2603:10a6:4:46::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4dcdb5b8-6e0a-4901-96bd-08d4df5f27e3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DB6PR0301MB2136; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0301MB2136; 3:6S8BD+kjQmaDxtgnAPn0MlAg0ZjkKt7PBeHrggxMz40/CbyFW2Cp9FP/iP/oKq1yZKOV1Kj3NKuQWVrwU4kM7tThUdYIKTk7hj643SaMMNpbsp1G7pE/VW/16cgMHSBcJBwCmbnWtS9b4+P0FWEa4WsaGN/sz7B5fe1YrqtTWkOik/i8Uv3Ms5F3MlexhjUtSlzoKD2ZbeQDRn0nlYP/FkWUamVY1J3v6SU6AwgXzQF44PsYofLDtyYyY9tiePj3; 25:xC2cuBsh3CwpMu5g3h9bQxqL6mMS09lL4HljykrL3D8H0LG0EP3xeKGNBKqIAfSia03Qwk3P0mc9Oe3yKAJNp0ytccsx0CTAxWFr3BxknvZS0MNkWuH4VqGtB2LA7Rw6hceBHFDnoR/cLenSFJXWGZqDftKkkmL2Z9SSyFTHEZNx5u5bLkzVmwTQKPnZet1bcuh2ZH7AxZmoa/zjUw/E32f1bXibv8L2BlfFznSXf0Oi+CwhQGOX3UuJ11imwSytUbcv4v10r8fLkbzRx3BEJNC7CfDqnF3E2ZZAGEoyGq39x5LdQl1UkFlk0JzQNXHKfuR/iOsRoBpWEXz+7SnkiQ==; 31:pOP98UZRKkDi/D/YnyWoWOSfJDKsh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igHLRdpeI= X-Exchange-Antispam-Report-Test: UriScan:(4114951738403); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB6PR0301MB2136; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB6PR0301MB2136; X-Forefront-PRVS: 0394259C80 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(199003)(189002)(72206003)(76176999)(50466002)(48376002)(54906002)(2906002)(5660300001)(305945005)(478600001)(7736002)(4326008)(5003940100001)(8676002)(81156014)(81166006)(97736004)(68736007)(36756003)(50226002)(50986999)(47776003)(101416001)(2361001)(53936002)(122856001)(33646002)(110136004)(6666003)(38730400002)(107886003)(2351001)(2950100002)(6916009)(189998001)(6116002)(3846002)(7350300001)(80792005)(66066001)(105586002)(42186005)(86362001)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0301MB2136; H:EPUAKYIW2556.kyiv.epam.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: epam.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0301MB2136; 23:YfLKyUog7yI/WyBm/O1oAZqBiSfiMXivwBNLggW?= =?us-ascii?Q?wUgBw8fJpgreKdeN+/NtI8KEsy+vJmItMDwkGlS1pX3SaLMh5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bWhWyke7l1qhBqsqtmcU3l1fanZpeG/g7fz0vhHQ=; 7:1GniJ64UxRK6gDcqg565cpMKLRtfbekUq5BmR5bdgnHXRQ4GRMm/3buSj+lrBs+6VwvOYg5/LTGKbc1fJeZt3gAEtp7rm237PdCWPcvzECxp6GXD0F3ViHhleyiLRohqb5++wCOGVGK4WcGQxhj4Dbes9aoR1bpEqL27KsdcB6ODmRIRHwJmCFY/RdmdPCPvO6YXsg0BrY9YOvlbPcVobJK8gcEgYeNpoM2hQHuyDQc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2017 19:45:14.6183 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0301MB2136 Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk Subject: [Xen-devel] [PATCH v2 3/4] arm: traps: handle unknown exceptions in check_conditional_instr() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP According to ARM architecture reference manual (ARM DDI 0487A.k page D7-1938, ARM DDI 0406C.c page B3-1426), exception with unknown reason (HSR.EC == 0) have no valid bits in HSR (apart from HSR.EC), so we can't check if that was caused by conditional instruction. We need assume that it is unconditional. Signed-off-by: Volodymyr Babchuk Acked-by: Julien Grall --- - Added reference to the ARM manuals --- xen/arch/arm/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index c07999b..eae2212 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1717,7 +1717,7 @@ static int check_conditional_instr(struct cpu_user_regs *regs, int cond; /* Unconditional Exception classes */ - if ( hsr.ec >= 0x10 ) + if ( hsr.ec == HSR_EC_UNKNOWN || hsr.ec >= 0x10 ) return 1; /* Check for valid condition in hsr */