From patchwork Wed Aug 16 18:44:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volodymyr Babchuk X-Patchwork-Id: 9904505 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 07FEC6038C for ; Wed, 16 Aug 2017 18:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEC9228A3C for ; Wed, 16 Aug 2017 18:47:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E369228A45; Wed, 16 Aug 2017 18:47:33 +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 47F7F28A3C for ; Wed, 16 Aug 2017 18:47:33 +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 1di3Jf-00081n-NW; Wed, 16 Aug 2017 18:45:19 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di3Je-00081T-FN for xen-devel@lists.xen.org; Wed, 16 Aug 2017 18:45:18 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 36/64-01732-DB294995; Wed, 16 Aug 2017 18:45:17 +0000 X-Brightmail-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tower-206.messagelabs.com!1502909116!68750001!1 X-Originating-IP: [104.47.2.61] 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 34012 invoked from network); 16 Aug 2017 18:45:16 -0000 Received: from mail-db5eur01on0061.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.61) by server-14.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Aug 2017 18:45:16 -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=N78FQRibDxBSI5q/hMHwPTbj4RpCi0hiCOzxD4X70fY=; b=HF0hSBcSKUSmY0/FJBSLojxWy479AieYuGdU2SWTasT/ApHInl19bH3roeNOW1SrNaz+KfozwHm7ZNNHnzEHLuvLCBDP2kbdSLd63x/4nwmgrQLjvg8oxodxO5f5b9QrLFX9LVcqrNEyl5VbwKPe1RM3fRQVcxSeyoUaqwn0v8A= Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.55) by VI1PR0301MB2141.eurprd03.prod.outlook.com (2603:10a6:800:26::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21; Wed, 16 Aug 2017 18:45:13 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Wed, 16 Aug 2017 21:45:08 +0300 From: Volodymyr Babchuk To: xen-devel@lists.xen.org Date: Wed, 16 Aug 2017 21:44:55 +0300 Message-Id: <1502909097-13244-2-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502909097-13244-1-git-send-email-volodymyr_babchuk@epam.com> References: <1502909097-13244-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.55] X-ClientProxiedBy: AM5PR0502CA0014.eurprd05.prod.outlook.com (2603:10a6:203:91::24) To VI1PR0301MB2141.eurprd03.prod.outlook.com (2603:10a6:800:26::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2e72a12d-7fcf-4fa7-861c-08d4e4d6ee6f 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:VI1PR0301MB2141; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0301MB2141; 3:6ayfQYmLhKL60zh8VRJQ3uuGFRz94o4Cc/LTUx2ZLjA/rC25wrfhJUEtvmSPCbcDHS6PBA0l12s2enZXbIuGTO6oKeRcTjPIZ4m1hxqPU7KFTEg/PzgKP4Pt61I+8IdC9zPvkqaheuYeGL9fVihEKhyIh725dRd16nFKMEECYQgtZ14rDd5UG49OUXUs1v76i5c6/drK5wo5Vy3RHFqzjCXmsa7bUs0EmKUicF4R2Kb2n4lrvHltXjLvpcIAMA/4; 25:mgH59R9TG6ohek528MdD8bAbJaOlfEFGqXnZ/KlQxjZKA3ZEcjOztGvz1PwEg35QXE3iVTaomDkHdRCMhqJujdRaq/tirTIW6SqW8Gv0KAyhat08xbZ5XHxeH+RfJeoOwyShLByDCXAJp3AJktGikRuMRWt0Mm00Q1k0ORE7km0lvxRNNDHnec27BN6i6IYqHArse2NPJ294aM1HJJsxIs9vMO9c8AaJbdHYyQcNJPwAYGUP2NDBZfpvsbRySVIQTWAWeWzZpGUazR4xthPqteNev+85c7qbCqvLU6svK931588Y+6VkrvBkQeYtJ2ix7lDv1SPRpqBuRNUdY4ZKWw==; 31:fiRaMRBFNqyHw8SV/XF3pblFkMoUjFAHB1jaua03nw2v6eCbm4oGT8ft3MBUT9z2XuyVI7ro1lWeKnz40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cpLKYHsDYVTX+/qc3dQ== X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(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)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0301MB2141; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0301MB2141; X-Forefront-PRVS: 0401647B7F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39860400002)(199003)(189002)(33646002)(6916009)(2950100002)(7350300001)(66066001)(3846002)(68736007)(8676002)(72206003)(42186005)(6116002)(7736002)(48376002)(81166006)(50466002)(81156014)(5003940100001)(2351001)(4326008)(478600001)(80792005)(305945005)(2361001)(50226002)(54906002)(122856001)(6666003)(36756003)(2906002)(53936002)(76176999)(50986999)(105586002)(101416001)(106356001)(5660300001)(47776003)(189998001)(86362001)(97736004)(107886003)(110136004); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0301MB2141; 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; VI1PR0301MB2141; 23:8c5KVsPjUxPunY5NQYg+iU8roqD3ALZIXWtVYVy?= =?us-ascii?Q?Ea3Sl1LOjsgLU+mSPTQA9hPJi1P4px3zI2w7ZB2kzGn4zYuxvPYTX/O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ickCWgwAc8itkzUgWqTNCJNLH0BpK131N6DokgYUjP5AeanoF+bKwlUE9MtWFWPT3vpsIZj6Uknqm2p1RsbxVZjq5iDLFGSjh53+1LSRNkPL3lk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2017 18:45:13.6596 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0301MB2141 Cc: Julien Grall , Stefano Stabellini , Volodymyr Babchuk Subject: [Xen-devel] [PATCH v4 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 */