From patchwork Mon Aug 14 14:24:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 110001 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp4281427obb; Mon, 14 Aug 2017 07:26:07 -0700 (PDT) X-Received: by 10.107.164.104 with SMTP id n101mr19091275ioe.42.1502720767651; Mon, 14 Aug 2017 07:26:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502720767; cv=none; d=google.com; s=arc-20160816; b=ZihLq7X67tm4GV2PcIzN3KsY3K15ULRK+8Egzd4y6KA3RuuAYtQ5r3074P3qDVTEt5 uUxfsFcTYDnDY5La2PHYwfdOIIbaTqrqCZb9s7+R6YBUls/nvgwD6BotAcQKn7TKF8ed xcfmuBkfX10dfMTvuxHwn35sW5p6Ul0x/t1mcrMzaFPM/vJ7DZMRn81PsjkaPSy1Egwd RaULesP+CMZ9M1A2CNF5TX+4QvvYXetkuo9bYg3BktGM9xz0SYqS3Yc/497DkiPvfxAE 3NkeJTQlPNITmbeyROGo8Eev4X52EERxUMSXkZP9cWFom3RW/SiAnPiYcW+5N8qzSsni z0Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:arc-authentication-results; bh=hUGSR/l4Js+DShChiFucreLOZqqH2MnQLG/QlysAWGg=; b=hYcnixtvyBZgthpEiTk6CVvgn5Y2fxr6rAcpmFSgrlWAwhLBPXq3C4szQRBirn0SAs hiMauHdypXO6vUP68idzum9dctxc9Ffbf+H0fQpHFzJOjneQ4XEI5rGhDOO+hWVbIDhS ZajmU74KGF3wnB48jwkEwANpo6yKAbR2ZIXxCYY1PfFy7h2zbHSM2pwcJlVXy4c8Sp3y QEriq/Fh5nDFye6I/pSYV6dVZcZsKMjLW3SaBQomLRVLr/tmOgUA5c3BQ1CVQktn2GwY M5KAE5HBo54TPRURlPuc8eQ5tMCNb6NEP4IBs9RB72hQxzkOoET+sLCzeFbnmq7cVppF BZlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id x21si5395075ita.34.2017.08.14.07.26.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Aug 2017 07:26:07 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhGIX-0000bD-QM; Mon, 14 Aug 2017 14:24:53 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhGIW-0000UI-BB for xen-devel@lists.xen.org; Mon, 14 Aug 2017 14:24:52 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id 24/75-03557-3B2B1995; Mon, 14 Aug 2017 14:24:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRWlGSWpSXmKPExsVysyfVTXfzpom RBj8fs1ss+biYxYHR4+ju30wBjFGsmXlJ+RUJrBlv5uxjKbjPVdFzeAVzA+Msji5GLg4hgc2M Emd7GtkgnNOMEi/PtzN2MXJysAloStz5/IkJxBYRkJa49vkyWJxZIFLi8Icf7CC2sECIRMuBY 2BxFgFViZ3zroDFeQWsJBY1tILFJQTkJXa1XWQFsTmB4p13d7KA2EIClhInVs9mm8DIvYCRYR WjRnFqUVlqka6xsV5SUWZ6RkluYmaOrqGBmV5uanFxYnpqTmJSsV5yfu4mRqCHGYBgB+PO9YG HGCU5mJREeRN8eiOF+JLyUyozEosz4otKc1KLDzHKcHAoSfCmbpwYKSRYlJqeWpGWmQMMNZi0 BAePkgjvLJA0b3FBYm5xZjpE6hSjLserCf+/MQmx5OXnpUqJ85aDFAmAFGWU5sGNgIX9JUZZK WFeRqCjhHgKUotyM0tQ5V8xinMwKgnzVoJM4cnMK4Hb9AroCCagI/pA7uctLklESEk1MJpv10 hvNrKeuKe4VHJm+/WbUzxfXZnx5E6SeKdSi1fbnbBpkWcPRihJzvvLqes7UWG55ZezjGyzNUO yY0uetofteNL/+gXzQodvz559ktOyzF3NkbwtmO35NtFN+69w9Bv8zz0xV7OUJyY+TPrpTo2Z FZP1TRlmxVvU9vwpj7todHxZ9Pm4TUosxRmJhlrMRcWJAIn1oaF2AgAA X-Env-Sender: julien.grall@arm.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1502720690!69857842!1 X-Originating-IP: [217.140.101.70] 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 53971 invoked from network); 14 Aug 2017 14:24:50 -0000 Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-5.tower-21.messagelabs.com with SMTP; 14 Aug 2017 14:24:50 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6A3761991; Mon, 14 Aug 2017 07:24:50 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.206.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7E80D3F483; Mon, 14 Aug 2017 07:24:49 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Date: Mon, 14 Aug 2017 15:24:05 +0100 Message-Id: <20170814142418.13267-15-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170814142418.13267-1-julien.grall@arm.com> References: <20170814142418.13267-1-julien.grall@arm.com> Cc: andre.przywara@arm.com, Julien Grall , sstabellini@kernel.org Subject: [Xen-devel] [PATCH 14/27] xen/arm: traps: Improve logging for data/prefetch abort fault 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Walk the hypervisor page table for data/prefetch abort fault to help diagnostics error in the page tables. Signed-off-by: Julien Grall Reviewed-by: Andre Przywara --- xen/arch/arm/traps.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 819bdbc69e..dac4e54fa7 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -2967,7 +2967,26 @@ asmlinkage void do_trap_hyp_sync(struct cpu_user_regs *regs) do_trap_brk(regs, hsr); break; #endif + case HSR_EC_DATA_ABORT_CURR_EL: + case HSR_EC_INSTR_ABORT_CURR_EL: + { + bool is_data = (hsr.ec == HSR_EC_DATA_ABORT_CURR_EL); + const char *fault = (is_data) ? "Data Abort" : "Instruction Abort"; + + printk("%s Trap. Syndrome=%#x\n", fault, hsr.iss); + /* + * FAR may not be valid for a Synchronous External abort other + * than translation table walk. + */ + if ( hsr.xabt.fsc != FSC_SEA || !hsr.xabt.fnv ) + dump_hyp_walk(get_hfar(is_data)); + else + printk("Invalid FAR, don't walk the hypervisor tables\n"); + + do_unexpected_trap(fault, regs); + break; + } default: printk("Hypervisor Trap. HSR=0x%x EC=0x%x IL=%x Syndrome=0x%"PRIx32"\n", hsr.bits, hsr.ec, hsr.len, hsr.iss);