Message ID | 1503347275-13039-3-git-send-email-volodymyr_babchuk@epam.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <xen-devel-bounces@lists.xen.org> 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 51A87602A0 for <patchwork-xen-devel@patchwork.kernel.org>; Mon, 21 Aug 2017 20:30:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44B3627C05 for <patchwork-xen-devel@patchwork.kernel.org>; Mon, 21 Aug 2017 20:30:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39436287F0; Mon, 21 Aug 2017 20:30:47 +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 BAF7527C05 for <patchwork-xen-devel@patchwork.kernel.org>; Mon, 21 Aug 2017 20:30:46 +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 <xen-devel-bounces@lists.xen.org>) id 1djtJT-0003cG-Gh; Mon, 21 Aug 2017 20:28:43 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from <Volodymyr_Babchuk@epam.com>) id 1djtJS-0003by-W9 for xen-devel@lists.xen.org; Mon, 21 Aug 2017 20:28:43 +0000 Received: from [193.109.254.147] by server-10.bemta-6.messagelabs.com id 2E/89-18185-A724B995; Mon, 21 Aug 2017 20:28:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjk+JIrShJLcpLzFFi42LRyGbR0610mh1 psH++sMWSj4tZHBg9ju7+zRTAGMWamZeUX5HAmtE0aQ9LwQ/WiuMTepkaGJ+zdDFycbAINDJL LO1cwNbFyMnBKBAjsWlLJyNIQkhgIpPEm7VrmUESQgLJEr+u9jCB2GwCJhLr5p9nB7FFBKQlr n2+DNbALLCTUWLBlm8sIAlhgVCJnVsXM4LYLAKqEju3LQUbxCvgJbFjxzawGgkBOYmb5zrB4p wC3hJn97QxQizzkvj2Zy8LRL2gxMmZT8BsZgEJiYMvXjBD9CpKHPg9kxlksYTANEaJ5tZFUM3 qEnt/v4EqkpU4enYO1DJfiTkr9rNANFxlkti/+BQ7hNPMLvH7+CaoDh2Jp0v+MEIknrNJHP3f yQaRsJT4+OMHlF0gsfHuAyaIohusEjdnHmaCSMhI/Fk+H6p7IavEgwdHmSCOSpB49/83VMdJH onWg7NYIZxOdonHB24yTWBUm4Xk3VlI3l3AyLSKUaM4tagstUjX2FgvqSgzPaMkNzEzR9fQwE wvN7W4ODE9NScxqVgvOT93EyMwNTAAwQ7GnesDDzFKcjApifJuSJ0VKcSXlJ9SmZFYnBFfVJq TWnyIUYaDQ0mC19FxdqSQYFFqempFWmYOMEnBpCU4eJREeBtB0rzFBYm5xZnpEKlTjMYcTR+2 fGHiuDd76xcmIZa8/LxUKXFeZ5BSAZDSjNI8uEGw5HmJUVZKmJcR6DQhnoLUotzMElT5V4ziH IxKwry1IFN4MvNK4Pa9AjqFCegUw9ZpIKeUJCKkpBoYz3eyd1tu5ZPLTdnHvq6RIeA486utel onojde+HLRYNPcXVU3Fz86f8KpK25V35Oc18usbMT8Zuxq1pTt/3f4o8oeHgf7Sy3253/Evlt yc8Od1683b7S3WF0+a85taWtBnRxHfaNKja8xB4UqT1ad1ZrW/UnwWXvZuZg8HXZl/1OsZkzX YsIOKbEUZyQaajEXFScCAC9Z3C+ZAwAA X-Env-Sender: Volodymyr_Babchuk@epam.com X-Msg-Ref: server-6.tower-27.messagelabs.com!1503347321!112962108!1 X-Originating-IP: [40.107.4.46] 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 36481 invoked from network); 21 Aug 2017 20:28:41 -0000 Received: from mail-eopbgr40046.outbound.protection.outlook.com (HELO EUR03-DB5-obe.outbound.protection.outlook.com) (40.107.4.46) by server-6.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 21 Aug 2017 20:28:41 -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=m/m2zR+CM7BN/HavCqNAasHfVUnv5wxRXkgMjnyXFkI=; b=JprN75iCEpF5meALtpGW/81lDG9g2JKF1Q5kVAgKrMmrm+NWykMFofEEMlld7W7JQGaBui94JfSWmwmXJMEEHq6kSJK8ug12VQGZ0sNLJg9y32ELYq3kyUa6CTTWfIyTa3AE0zEUq+fm+wyPQQAWRVjyv7HudCRy+jwI7o5XUWE= Received: from EPUAKYIW2556.kyiv.epam.com (85.223.209.58) by VI1PR0301MB2142.eurprd03.prod.outlook.com (2603:10a6:800:26::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18; Mon, 21 Aug 2017 20:28:38 +0000 Received: by EPUAKYIW2556.kyiv.epam.com (sSMTP sendmail emulation); Mon, 21 Aug 2017 23:28:33 +0300 From: Volodymyr Babchuk <volodymyr_babchuk@epam.com> To: xen-devel@lists.xen.org Date: Mon, 21 Aug 2017 23:27:46 +0300 Message-Id: <1503347275-13039-3-git-send-email-volodymyr_babchuk@epam.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503347275-13039-1-git-send-email-volodymyr_babchuk@epam.com> References: <1503347275-13039-1-git-send-email-volodymyr_babchuk@epam.com> MIME-Version: 1.0 X-Originating-IP: [85.223.209.58] X-ClientProxiedBy: VI1P190CA0032.EURP190.PROD.OUTLOOK.COM (2603:10a6:802:2b::45) To VI1PR0301MB2142.eurprd03.prod.outlook.com (2603:10a6:800:26::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2e1c09c3-ff72-4d73-63a4-08d4e8d334f5 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:VI1PR0301MB2142; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0301MB2142; 3:nplxt5uQldqkTd0h8eV1Jwne62vFDREW/G/B3U3sIxTIhKyYBuSIkRIsfSw5ooKET59ktQkFCFdP0CiJBcqcuW5+Kh8O9DWCctloUoN3LmpIgVVmbHP8TzCxzkrJAoY7RTNoe7Th4atqHVLrtKOs82yiCFIVQf3f3ErwB0TEUVl1OdZnLtuBrnyDuZINxyoM2dkIWWaKoJHBmEACIKsXQt0KLo6RwlD0aJe6F8W1Hhr+lNsKGPydTg57sfZVrjLd; 25:0n198owTx5X9GUOVr4RUmA4aB4GNUfY9CzyEuq9NowNZ/aaBz4rm6j2zCX0GULGm+KEQrEfHdoexn4LiOwBiOrrMQtRzru1Yawx9GMPaMReN4cYOaKFqZS8a3lrkSvBr3vZtvsfaPbnzlL3IwnIXEbN2d9fy5tKc9Po5hiWhk3mbtxSdy8DAkF8WBGcfGM5b6VdHG6jhLdNWlPciz60Dc16lqHPsOzulk90V36F/ilzN1A073yuyZyPlL9PDV2xAXA/+iD3uS+VngzQrNTJiyCEVknuZTVTfRdGEORUgIo1lmU5zrt5/2l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zWy1AhygKkZpuSV9FrjI0ZgYfXC1EezLPB5kL/NUYrkjSqFuzVypoIyxH/ITuXN6HqQOpxY+BlwGldBo4= X-Exchange-Antispam-Report-Test: UriScan:(4114951738403); X-Microsoft-Antispam-PRVS: <VI1PR0301MB214208146897AB6FBCF87E56E6870@VI1PR0301MB2142.eurprd03.prod.outlook.com> X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6041248)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0301MB2142; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0301MB2142; X-Forefront-PRVS: 040655413E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(199003)(189002)(5660300001)(2351001)(101416001)(8656003)(6916009)(7350300001)(76176999)(42186005)(2950100002)(50226002)(106356001)(54906002)(5003940100001)(6666003)(81166006)(105586002)(50986999)(48376002)(50466002)(81156014)(8676002)(7736002)(72206003)(305945005)(33646002)(2361001)(53936002)(2906002)(86362001)(122856001)(47776003)(66066001)(478600001)(80792005)(6116002)(189998001)(4326008)(3846002)(8666007)(36756003)(107886003)(110136004)(97736004)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0301MB2142; 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; VI1PR0301MB2142; 23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nEXPPd7dGIhWWb78pY6BxZzY88nqItSwY0NhjuS92Jt/yDVaeKhduU6S5AYEfOesT4jpuFBTERabsNYfrKp+y3MSV4chedf8xrSL4JzINFvE7OIte594I6aI3EbmjOOx36tGFTJ+MQx2ioJyrfvbS/y/nFoc6KOn/z/PJrc1ETi7Ki0eRLoFwQu3545sjSIq1ILy6yio= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2017 20:28:38.6885 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0301MB2142 Cc: "Edgar E . Iglesias" <edgar.iglesias@xilinx.com>, Julien Grall <julien.grall@arm.com>, Stefano Stabellini <sstabellini@kernel.org>, Volodymyr Babchuk <volodymyr_babchuk@epam.com> Subject: [Xen-devel] [PATCH v4 02/11] arm: traps: check if SMC was conditional before handling it X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion <xen-devel.lists.xen.org> List-Unsubscribe: <https://lists.xen.org/cgi-bin/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xen.org> List-Help: <mailto:xen-devel-request@lists.xen.org?subject=help> List-Subscribe: <https://lists.xen.org/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" <xen-devel-bounces@lists.xen.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Hi Volodymyr, On 21/08/17 21:27, Volodymyr Babchuk wrote: > Trapped SMC instruction can fail condition check on ARMv8 arhcitecture s/arhcitecture/architecture/ > (ARM DDI 0487B.a page D7-2271). So we need to check if condition was meet. > > Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Reviewed-by: Julien Grall <julien.grall@arm.com> Cheers,
diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 66f12cb..82cd2b1 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2159,6 +2159,12 @@ static void do_trap_smc(struct cpu_user_regs *regs, const union hsr hsr) { int rc = 0; + if ( !check_conditional_instr(regs, hsr) ) + { + advance_pc(regs, hsr); + return; + } + if ( current->domain->arch.monitor.privileged_call_enabled ) rc = monitor_smc();
Trapped SMC instruction can fail condition check on ARMv8 arhcitecture (ARM DDI 0487B.a page D7-2271). So we need to check if condition was meet. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> --- xen/arch/arm/traps.c | 6 ++++++ 1 file changed, 6 insertions(+)