From patchwork Wed Apr 5 09:09:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Chen X-Patchwork-Id: 9663445 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 9021660352 for ; Wed, 5 Apr 2017 09:13:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7139628556 for ; Wed, 5 Apr 2017 09:13:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 660D4285A3; Wed, 5 Apr 2017 09:13:05 +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 4455D28556 for ; Wed, 5 Apr 2017 09:13:04 +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 1cvgxH-0002Gi-Gn; Wed, 05 Apr 2017 09:10:19 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvgxG-0002Em-EO for xen-devel@lists.xen.org; Wed, 05 Apr 2017 09:10:18 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id DF/41-04817-974B4E85; Wed, 05 Apr 2017 09:10:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSb0gTcRjud3ebp3h2TsPXoWZTEISZhqhBlBW EUoZ9iMQv7szLG23TdjPmB1FzZllmCmJTM0MtzIjSWZouammZkZZRIf5Ja5R/6oOWiZTYnadm 9+l53ue55/e88JK4Il+uJFmziTUaGJ1K7kZw29FudbbNmRQ+tuAS0zBbT8SiuJ7O31giSpZpD akZZo2McywNyzJ/BJmLLG/wPPRTWYzcSILOw2Hx7hlCJAq6HoNP9mFMIs8wmPyytKIgehBBZ4 8Vl5RHCPK/9q6SUgzONVpXA2oRWDuahABXUk5vg5KyfELE3rQ/NBfXuIgYpwsQ3Fk8IGIvOhG muxdW5gQdDCX3imUipui9MFr9dmUOdAAM9Z/HRewqzJ2XpEwFHQtltcuE5PeEF1YnIeUDPJmc xCWPP1SOvEJSji+8H3otZJICDoI+y2GxM9CTBJR/7MAlYpNBTcH06g8JcGNhXi4JwmZj+QuYR AYIsF9scJHIbTlMFb5bec+DVsCD8a5VVzsGI1M3MSkrE6qvlcokHA9z891IMhXh8NLeJruM1F UbFqnasEgdwm6hEJ41nmaN6p1hqUZtOmfSM1qdOiI8KkzP8jyTzuqYVD7seIa+BQnnsEn42tF oS6ID+ZKYagsVeMiZpPBIzUjL5hieSzFm6VjegfxIUgUU3yponkY2nTWf0OqEm1qTgXRXeVM5 okzxmYye16ZLUh9Sk+093d8wBWHIMLBKHypZNNGiicsyrEesXeYg8ld6UUgopXDPZI16rel/f Rr5kEjlRZWKKe5ag2n9pWmhBCaUcI5MiCVMzD9JmYei718P9i63DvKhdTa/U91X/ozGOJ4eLL QlzPzyff6wdX9WYm7UkFsMtRS1o+XsjPl7U7UmZW45LKdSY/Ehvfc1M2Ul82l+9seRFczAQEj wrrheTXR8V3BHwMTWCxWqk/3Vxc3mpLTIJS5odvPV0mOmz4F2rm089+ieDwMJDUcsjSqC55iI UNzIM38BZPCRPpQDAAA= X-Env-Sender: Wei.Chen@arm.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1491383416!43249536!1 X-Originating-IP: [104.47.1.62] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15913 invoked from network); 5 Apr 2017 09:10:17 -0000 Received: from mail-ve1eur01on0062.outbound.protection.outlook.com (HELO EUR01-VE1-obe.outbound.protection.outlook.com) (104.47.1.62) by server-2.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 5 Apr 2017 09:10:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=flX8SDSUJWMRqkadfJjkqlJuXpPXv/6IGt/uwBsgRXc=; b=jTHIrzZQi0Phm2oBsM67v+VmBc2n1u0mMinio8Fvne3E/ecNXA8cCDeYUVujkmZ+n1ilBJ2DMpcmxY45szvdaOQZUEyhmR75d2RghIvoGaBPkL4xYWR4VlgiPEgOj3+Tzx/FrEgJMxgwhfkSYbxMxRHmyuZWTzxzVW/uI0p/JXs= Received: from VI1PR08CA0063.eurprd08.prod.outlook.com (2a01:111:e400:c53b::31) by DB5PR0801MB1573.eurprd08.prod.outlook.com (2603:10a6:0:3b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Wed, 5 Apr 2017 09:10:15 +0000 Received: from AM5EUR03FT022.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::207) by VI1PR08CA0063.outlook.office365.com (2a01:111:e400:c53b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10 via Frontend Transport; Wed, 5 Apr 2017 09:10:15 +0000 Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by AM5EUR03FT022.mail.protection.outlook.com (10.152.16.79) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1005.5 via Frontend Transport; Wed, 5 Apr 2017 09:10:14 +0000 Received: from P300.p300.shanghai.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Wed, 5 Apr 2017 10:09:58 +0100 From: Wei Chen To: Date: Wed, 5 Apr 2017 17:09:15 +0800 Message-ID: <1491383361-22886-14-git-send-email-Wei.Chen@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491383361-22886-1-git-send-email-Wei.Chen@arm.com> References: <1491383361-22886-1-git-send-email-Wei.Chen@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(39450400003)(39840400002)(39400400002)(39410400002)(39850400002)(2980300002)(438002)(199003)(189002)(104016004)(48376002)(356003)(38730400002)(77096006)(106466001)(2906002)(2351001)(54906002)(50986999)(305945005)(110136004)(76176999)(50226002)(50466002)(5003940100001)(189998001)(575784001)(36756003)(86362001)(47776003)(5660300001)(4326008)(8676002)(6666003)(8936002)(6916009)(2950100002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR0801MB1573; H:nebula.arm.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT022; 1:ikbLLMHkewpjEboKo20Kb1KAC5tiiFFZrHuMxwUrlTissnlXbPUGSvqLNdvxaZcWlrCDitwJoip8EXau6F/G22Nd1jUynyNj4A7cb2qejM5uBjG99rU5vwU4M3yDlAQrsyBzEQk+yGsGYHsymfofUN13FpTjPpmvbO01Qr+ondJdL2yVHTuUY++JO3IACGcZDs+kvfxRt+dRLpUnHiSC8eZUQdVL8gARPjwEvPgmytjmukr4RBSnFws1SVoIpegJ2EVvadSlDgRrpg22hQ8Sp5aSLs/f/O5hacoKkbwr/xM6btI1hlgFQe53Y1YRQyyTXSUtNqJ9aSONoSXZHCfItdgoyIFxrKshbgV2WKELu0sq2zGKOJUyUpfzu92dHI2XPvxEx6nXBHzExUsngXzjtRoYw4nbjUyLvz2LgzAI6AznyN4atnEYLqI9M2/J/uFLbLOazjeh/ERK+HJf+aBh5KuRsml8yB8AtmbbMtJUqQj92iwLhjac7iIskDtow3m60KfTMnxS3OzIG9m7dNfkqt/gK0HS82BMU1rwtF/SE55YOaOM+Q6q0PDVAB1WYtaBfCbjLzMPDx07ihgh7H4qbsc76tzzwEp1y6jKnOggnN1huEvjW2SUthll7ArIQBzy X-MS-Office365-Filtering-Correlation-Id: 906585b4-23e2-4ae1-2304-08d47c03927a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DB5PR0801MB1573; X-Microsoft-Exchange-Diagnostics: 1; DB5PR0801MB1573; 3:PV/e5BuK+5Dmjrm9UK9l2lJkMumYiMxTFvEMaQtajt3f4+gDEybGz5vlAw4C7wPBg1otDgmPwn64nBIcIHXNefjOD5xUaI1IZqdQ6WQRaJl7/s2ntAtbjyjI88+qXOhk9u1DmhLknAATU7JtQLraxpxPlaEelMC6/B2HsZ0gCW9XDx1TVc7AUFPy18OladXD3JXuXc+WYyYAKkALBHhIB5Ppyhu5FB+gyH23R5v+f4vC3pSMagT1frYo4JwSyO/BUC/o/XR6njmrHYFGoUEcTLtybpZdaAD1nVrQ881zHJWUNvxnEQJebsKkbVXKo+NAZOHSayZnnrnUSo1mJtPztzF3uSOAENO+l/kcaZ8KMeC2WBSx1DYut/r9vQNmgpbY63DeulunsvnqHHJF32Hclq48njkh8cxLvTPBqsiw2c9ZWvYfvq9aOsbD47kYobydh+Z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JKCEH9U15bAN49iCy3SzgZQylR92FlXzaKyhBkvfnGI33Ov+nBTSHJFhYUFQiV7diqjDqrkY0JtJllVWWgpQ5/uMt5gaAkVOj++U24XIiXKPtQK1+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13024025)(13023025)(13020025)(8121501046)(5005006)(13013025)(3002001)(93006095)(93004095)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(6072148); SRVR:DB5PR0801MB1573; BCL:0; PCL:0; RULEID:; SRVR:DB5PR0801MB1573; X-Microsoft-Exchange-Diagnostics: 1; DB5PR0801MB1573; 4:OsbUAVwuPc3GRX0tgE5dg8Dn+8kdgF72Io1CEk4hPCB/iW3ccQHeGXnrtYPtzaTpquthskkfaNb8UPx+uYlRI3k1E7Kb1KFVCNZyOn3W0IGm8pQ6QS9cUx2ed5zIHjtXOcfvQtHOEk8JO0OszYB2u2u0O/MkVXevl2cp0Zo/DjySs6PufzddrObO6ld7BE/iABRTwfECnkS9PT8p2vDqy3TWYREDFd4UYuy335jTtbNUFxlE6Z2mLlnc2otSOZit3AdU7XlTy/W+ObW0iDcRVrHX29ujWKjXT4eyPD60eeVA/gqXZq8yz84IkWvOmGe1X2LB08paKq0ZATovaDY5ANvOYp9n/N9BhhMHFa0g591/mWTu3heeFkFOGwjIMFVXbZYQgsqoL7mo3ZXNuGNdwtqi3xYHbZlH6e/IreIISB7jYEUSsHlxG2tTKKs3AIQx9v04yrfaVeasBdWsjAAv6Lwtmj0t442IwhSNKSVz2AgsdAopK+k//7E2G2zFdXbJa4SpezrAOch/25dbpDKztMvvyT4MR3Bzp7liVriQ13KkJwVQKrUn0bJ6K2Mt/bNdd9nK8F5dfW+xDGrPt5JBzZ5xetnykoQwalG1sCXSw0RnYyfwdNlBhbgq+fTd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GRrQBNbvxW9QqyaE6mtgcsd9y5wAvuOisZMWmuhT8lfuyertSr2GSSGIGDOkf7pVtPILX9i8A==; 24:5pnjY9xD4zjvomB/PbG3V1evzwA1SJb+Ecb/44HmxMIxCUELudvA68vm1591ttez8YGSC8DqmYcuM+qSijcSBiUmuW2DMOAWqLyBiOuDtcs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB5PR0801MB1573; 7:4k/nY2pEjoKA8IlwLIYprbDFRGxX0Eme78fHFw0FX5vlXvr/AKyWr1afz3EN7fKsAHiS6KDpaZYOxsNtk344Ww55d4MYOsHZId4AJHPtb0Aiq4feaFVeUhKjPkk60aD2jNg3/CMkKKNM+tAgO2UPIUnUZAOVmWDIwekIyJB8RZiJbIu9usLy3dtJfBbdqYt8FKVKmggUk28Ee/7+CSGrbBStRTV5vgD2yg902WTi8y1b26/FzY9pT52jCw/owCBYjguLdHXDF5r1B8H6Q6Xd4WdYrvtaJFmWeWFjaK8PPX1JOkLq4WYCoAmIDaq/WfkGiQRBPsoiZuNi8N/eovZrlA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2017 09:10:14.7962 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR0801MB1573 Cc: sstabellini@kernel.org, wei.chen@arm.com, steve.capper@arm.com, Kaly.Xin@arm.com, julien.grall@arm.com, nd@arm.com Subject: [Xen-devel] [PATCH v4 13/19] xen/arm: Replace do_trap_guest_serror with new helpers 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 We have introduced two helpers to handle the guest/hyp SErrors: do_trap_guest_serror and do_trap_guest_hyp_serror. These handlers can take the role of do_trap_guest_serror and reduce the assembly code in the same time. So we use these two helpers to replace it and drop it now. Signed-off-by: Wei Chen Reviewed-by: Stefano Stabellini --- xen/arch/arm/arm32/traps.c | 5 +---- xen/arch/arm/arm64/entry.S | 36 +++--------------------------------- xen/arch/arm/traps.c | 15 --------------- xen/include/asm-arm/processor.h | 2 -- 4 files changed, 4 insertions(+), 54 deletions(-) diff --git a/xen/arch/arm/arm32/traps.c b/xen/arch/arm/arm32/traps.c index 4176f0e..5bc5f64 100644 --- a/xen/arch/arm/arm32/traps.c +++ b/xen/arch/arm/arm32/traps.c @@ -62,10 +62,7 @@ asmlinkage void do_trap_prefetch_abort(struct cpu_user_regs *regs) asmlinkage void do_trap_data_abort(struct cpu_user_regs *regs) { - if ( VABORT_GEN_BY_GUEST(regs) ) - do_trap_guest_error(regs); - else - do_unexpected_trap("Data Abort", regs); + do_trap_hyp_serror(regs); } /* diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm64/entry.S index d2ebf5b..7b16850 100644 --- a/xen/arch/arm/arm64/entry.S +++ b/xen/arch/arm/arm64/entry.S @@ -178,40 +178,10 @@ hyp_error_invalid: invalid BAD_ERROR hyp_error: - /* - * Only two possibilities: - * 1) Either we come from the exit path, having just unmasked - * PSTATE.A: change the return code to an EL2 fault, and - * carry on, as we're already in a sane state to handle it. - * 2) Or we come from anywhere else, and that's a bug: we panic. - */ entry hyp=1 msr daifclr, #2 - - /* - * The ELR_EL2 may be modified by an interrupt, so we have to use the - * saved value in cpu_user_regs to check whether we come from 1) or - * not. - */ - ldr x0, [sp, #UREGS_PC] - adr x1, abort_guest_exit_start - cmp x0, x1 - adr x1, abort_guest_exit_end - ccmp x0, x1, #4, ne mov x0, sp - mov x1, #BAD_ERROR - - /* - * Not equal, the exception come from 2). It's a bug, we have to - * panic the hypervisor. - */ - b.ne do_bad_mode - - /* - * Otherwise, the exception come from 1). It happened because of - * the guest. Crash this guest. - */ - bl do_trap_guest_error + bl do_trap_hyp_serror exit hyp=1 /* Traps taken in Current EL with SP_ELx */ @@ -267,7 +237,7 @@ guest_error: entry hyp=0, compat=0 msr daifclr, #2 mov x0, sp - bl do_trap_guest_error + bl do_trap_guest_serror exit hyp=0, compat=0 guest_sync_compat: @@ -309,7 +279,7 @@ guest_error_compat: entry hyp=0, compat=1 msr daifclr, #2 mov x0, sp - bl do_trap_guest_error + bl do_trap_guest_serror exit hyp=0, compat=1 ENTRY(return_to_new_vcpu32) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index c5c5ff5..21cf922 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2953,21 +2953,6 @@ asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs) } } -asmlinkage void do_trap_guest_error(struct cpu_user_regs *regs) -{ - enter_hypervisor_head(regs); - - /* - * Currently, to ensure hypervisor safety, when we received a - * guest-generated vSerror/vAbort, we just crash the guest to protect - * the hypervisor. In future we can better handle this by injecting - * a vSerror/vAbort to the guest. - */ - gdprintk(XENLOG_WARNING, "Guest(Dom-%u) will be crashed by vSError\n", - current->domain->domain_id); - domain_crash_synchronous(); -} - asmlinkage void do_trap_hyp_serror(struct cpu_user_regs *regs) { enter_hypervisor_head(regs); diff --git a/xen/include/asm-arm/processor.h b/xen/include/asm-arm/processor.h index 81227aa..bb24bee 100644 --- a/xen/include/asm-arm/processor.h +++ b/xen/include/asm-arm/processor.h @@ -707,8 +707,6 @@ void vcpu_regs_user_to_hyp(struct vcpu *vcpu, int call_smc(register_t function_id, register_t arg0, register_t arg1, register_t arg2); -void do_trap_guest_error(struct cpu_user_regs *regs); - void do_trap_hyp_serror(struct cpu_user_regs *regs); void do_trap_guest_serror(struct cpu_user_regs *regs);