From patchwork Mon Aug 14 17:15:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 9899831 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 820D0602CA for ; Mon, 14 Aug 2017 17:18:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C09228671 for ; Mon, 14 Aug 2017 17:18:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60B3428678; Mon, 14 Aug 2017 17:18:23 +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 38F1F2867B for ; Mon, 14 Aug 2017 17:18:20 +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 1dhIxv-0004Ft-7r; Mon, 14 Aug 2017 17:15:47 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhIxu-0004Fc-A9 for xen-devel@lists.xen.org; Mon, 14 Aug 2017 17:15:46 +0000 Received: from [85.158.143.35] by server-6.bemta-6.messagelabs.com id D0/26-03937-1CAD1995; Mon, 14 Aug 2017 17:15:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSb0gTcRjud3fbztrZbWq+LosaqGVpZaX1JSw oRI3yW2aQp17bcP/aTVnQB8WMlEqlCLQgUclQSh1Zmqx0ZlErKy3TDTMkp0lFYpQ0ze52Wvb7 9Ly/53ne933gJXFlkVRFsjYrazEyerV0ObEhFz8S0+muSN/qbdqyq26qlkhEST0dPuwwOirRG bNMtkyJ1l3gkpmLFbbmhiZZAXpIlaLlJEEX4jDcPywTCiVdhsHsj198EcAX2dByptqPpfQOuH 39pR8H06thYLofCQacPougsNOOCUQQfQh6na9xARN0BDz21iMBU3QyfJ+1SwQM9FoY6i3xawL oFDjvcWHisGRo7XhCiHoFPK386Mc4DdA1MYGL3vUw9vMDLgwG+gqC+bIOiWiOAofv84JoDfS8 uMabSR4fBMdIjvj9FoMrFfmit0gGHvutBf1muFvWg4nEuBQafTdlIrEbpmZmpCI2g6N7UCaKB iVwr823ECccPF++LLjLeKLOTYgrZcLXeZ8/G6KPgf1OCRJFpXJw3W+WikWJDBpbWqXlKLJqSf CqJcGrEdaAojjWks9aYuJisyw6jdZqYHT6mG1b42MNLMcxGlbPZHGx2SaDHfGnsIx/bejG3D4 nCiMxdQiVmXohXRmYZco5pWU47XFLnp7lnCicJNVAaYYq0pUKC6thbSd0ev6eFmkg5epg6qVA U5yZMXA6jUg9Q9vJ91dbv2PkZPn8D0xJGE1GVhVKRQtSWpBq84x/Gy3eZh9aowqiEL+aUm5mL Qad9X9+EoWSSB1E1Qhd5Dqj9e+8SX4VjF/lopCC4qzMP0pVgHa6V4w9uurwnKwPP/CGPW0YGW i7eMm1nyEklZqM1HHn6DgH3Yr2Pu/0ut9xw6uqBh7sbdr0GnGX27++yx+rqe2qdzRn5G+KwF1 pdaPFipBvysjieGnCq08qai7lXOkec1x1r81R9/xcbpIXyQM3VualJaaGzK0sD0sYHHJkRKgJ Tstsi8YtHPMHO6vP55YDAAA= X-Env-Sender: Volodymyr_Babchuk@epam.com X-Msg-Ref: server-4.tower-21.messagelabs.com!1502730944!71679987!1 X-Originating-IP: [40.107.3.88] 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 36793 invoked from network); 14 Aug 2017 17:15:44 -0000 Received: from mail-eopbgr30088.outbound.protection.outlook.com (HELO EUR03-AM5-obe.outbound.protection.outlook.com) (40.107.3.88) by server-4.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 14 Aug 2017 17:15:44 -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=1fxwZcMJ7/DwKDGZT3o6HVbB5i7UyZc5/5oyyVgU/yw=; b=kZpPZCPxpoU80KmB0BfYUkmQAmF0XsEIB4UKfWfEXySWjwC2l4KFGzk/Isl0wsYRMczj792eoaxDOJ3jR3aSs3q1x3M5DozxwtfAZjG8zxuGmcoVPdcV2peQiSEFURJvlLVA2SsD2w3NU1a+lH+MBQhVGNSeOIyQzly3ZRAaftA= Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.52) by HE1PR0301MB2140.eurprd03.prod.outlook.com (2603:10a6:3:21::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1341.17; Mon, 14 Aug 2017 17:15:40 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Mon, 14 Aug 2017 20:15:29 +0300 From: Volodymyr Babchuk To: xen-devel@lists.xen.org Date: Mon, 14 Aug 2017 20:15:07 +0300 Message-Id: <1502730909-28413-2-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502730909-28413-1-git-send-email-volodymyr_babchuk@epam.com> References: <1502730909-28413-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.52] X-ClientProxiedBy: YTXPR0101CA0059.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:1::36) To HE1PR0301MB2140.eurprd03.prod.outlook.com (2603:10a6:3:21::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 61dd9289-76d1-4fb9-1af4-08d4e338179f 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:HE1PR0301MB2140; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0301MB2140; 3:7Fn+7jfPwDVKompLpVCeqcOA6EXiWku1bEtE8z3rY/vyiJJdmsi2zBrsiA0hXdoiAb4zfm8jiD3cdkAN0Y7jdpGAklyZgioDZLUWsObzylzGaCzbnzn7cXlg/+URI40oGvX3IH4/818w1UCt+T8/a2q93OAZKmn5KVSoRdCJ2SNxgyP9IPS68XBGd8Gjg04xiPu6OQ2Yb0Z1yjIJSV7MYlHiOpQS/uzTqQJ5wWXmh1rgOlmF6W3CwlRqReRQyZZd; 25:j98xBUS7I16dLz5e9YCnaUyZbg1kNHZ9giWAMftkrEXwNCGORl9ijN0DySlr/epoIXUbcQa+F0/o0GI2MY8HTGHLbqWOeBMEzKS8m72UsvB218dn8EL15G2p3EVj+Ez90WffYgvQkZMrLYu4pu25hMvUNTTsaelFukE9N/15pUtkoffcoasZDUx1izPxa1w+WBr4U+hQBCIbxLZY6UKAGq4Olg2CUVHOwpMdwQNR3QAIxIcqn56yXj+7tYPmMvf+cixMbdQe5/lMNhVS9NQrTMblQehlPQ86OPzY4JKuCbI5h5VYqEQzFgHykuPHnRsllS2REHJSht+PP3Jms9TfQA==; 31:IC4i/tKce1Uf/vc4Z3YWIqnCwvec07Dtn/ZyS29UXwR29Vlr/unPUfhqPY8E7Xwziwskcigfj9RWQ5eVQecAcMedIgOLiAYKXC5CsDNYn0gkwvgXOARTyQvSFC3oLN8KY3QUSa+vKL9oiJD815LW+Bsb0JMXv1l2gNmz5eTYjn1pi4ihfVLYu3F8ro0mVDQteBkViafGZk0Og+RqpYqfsLwhdmwdyWcJWALPa7wmZyc= X-MS-TrafficTypeDiagnostic: HE1PR0301MB2140: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0301MB2140; 20:u8yFEEpk/NsQVNLiCriHNj+73uffrYRH7+8awyFWl0jlCsynG0eJOjdGtAnLsxUj9U4eo36xFVKEURIP/yX2VZmyNQFHvY6X1imND/OIkthd1d8dgOMrKuZzhynXHelkgfafyU/71ktB/rEakEZ8Bm1EeSAGqMW+cWgjPnaLleuwqEaEyeQy3SbZxgVE+Gb4kN1NWWzzVT4mwrzKQefE6MFwsfYQHAPo4fqCfDTWCh2jF8tov8GtEpAdFJTEVE4XVGV567jCRHiTEHGGdHBUO8/68zN+OnbEod7P//YeXW14iulIKRS60J9ule0GloCFDRmClO9ujpnP+67W+Rw3Vf4UxhskneHqycteTxDNVzsljqjLVdwIzWF3zbGJsMt/nKWB8AEHXzdnjJoxtrf4M+taHznp4uyPa2RtCvmK/uPkgtJkh8mKSnJD+SwYC8ZL8kxpf7OzEO2urlyXicES/DH+RupYQfwUJfcgj9AqkrR1tkEoaKhe+MfwyM68uB9Z; 4:VFPcuMuamXuSPt8AgGiQiGYtMwNU5/nvS3gGbVJ3B+vc8tMViiV9X/Yecewau8YGZaYNGiqSRFx9sbw4rPZtjvr8/csXkF0h21sAs0e3JZ9nTQqK/JN9PLUF6UM0lBktFcOVYpNkRISIjis4W3Y9UQJ1l+EA4/HYKAshY/Nt50D6kzkzzFRAf56xzexLGxGvFqE+3cvafYWzkUSDDjB6GHZAptEmL4NyQWru0DHi8fvZ56isCxUSbYJf6JeEwXReBPLHhZJBhWxw/3/v6QmYbL2sWF6cy2h4CWx6ISJEPug= 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)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123555025)(20161123562025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR0301MB2140; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR0301MB2140; X-Forefront-PRVS: 039975700A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(199003)(189002)(8676002)(478600001)(81156014)(110136004)(107886003)(81166006)(2950100002)(7736002)(6666003)(305945005)(6916009)(53936002)(48376002)(54906002)(6116002)(3846002)(97736004)(68736007)(50226002)(50466002)(80792005)(42186005)(66066001)(50986999)(105586002)(122856001)(76176999)(5660300001)(4326008)(7350300001)(36756003)(47776003)(106356001)(86362001)(33646002)(5003940100001)(72206003)(189998001)(2906002)(2351001)(2361001)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0301MB2140; 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; HE1PR0301MB2140; 23:rwv8wbtqNnGa2T7EC2QOjkG5uSUFwqcQc4nUSz/?= =?us-ascii?Q?sTlQY+b2fYDH7APA16uFC5CTQ7clBgn9ysgT2a7KiqVXW6vSprYN5e0xOr5D?= =?us-ascii?Q?33qF6+SZpc2rlE/WmxO2yZSQuKbeCJ6SbN33FTSkZzuF7fvAEZqiWk2GU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osticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2017 17:15:40.3496 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0301MB2140 Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk Subject: [Xen-devel] [PATCH v3 1/3] arm: processor: add new struct hsr_smc32 into hsr union 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 On ARMv8, one of conditional exceptions (SMC that originates from AArch32 state) has extra field in HSR.ISS encoding: CCKNOWNPASS, bit [19] Indicates whether the instruction might have failed its condition code check. 0 - The instruction was unconditional, or was conditional and passed its condition code check. 1 - The instruction was conditional, and might have failed its condition code check. (ARM DDI 0487B.a page D7-2272) This is an instruction specific field, so better to add new structure to union hsr. This structure describes ISS encoding for an exception from SMC instruction executing in AArch32 state. But we define this struct for both ARMv7 and ARMv8, because ARMv8 encoding is backwards compatible with ARMv7. Signed-off-by: Volodymyr Babchuk Acked-by: Julien Grall --- xen/include/asm-arm/processor.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index 855ded1..926ae68 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -488,6 +488,23 @@ union hsr { unsigned long ec:6; /* Exception Class */ } cp; /* HSR_EC_CP */ + /* + * This encoding is valid only for ARMv8 (ARM DDI 0487B.a, pages D7-2271 and + * G6-4957). On ARMv7, encoding ISS for EC=0x13 is defined as UNK/SBZP + * (ARM DDI 0406C.c page B3-1431). UNK/SBZP means that hardware implements + * this field as Read-As-Zero. ARMv8 is backwards compatible with ARMv7: + * reading CCKNOWNPASS on ARMv7 will return 0, which means that condition + * check was passed or instruction was unconditional. + */ + struct hsr_smc32 { + unsigned long res0:19; /* Reserved */ + unsigned long ccknownpass:1; /* Instruction passed conditional check */ + unsigned long cc:4; /* Condition Code */ + unsigned long ccvalid:1;/* CC Valid */ + unsigned long len:1; /* Instruction length */ + unsigned long ec:6; /* Exception Class */ + } smc32; /* HSR_EC_SMC32 */ + #ifdef CONFIG_ARM_64 struct hsr_sysreg { unsigned long read:1; /* Direction */