From patchwork Fri Aug 12 19:24:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 12942492 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57261C00140 for ; Fri, 12 Aug 2022 19:25:25 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.385864.621704 (Exim 4.92) (envelope-from ) id 1oMaHW-0002Au-6j; Fri, 12 Aug 2022 19:25:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 385864.621704; Fri, 12 Aug 2022 19:25:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMaHV-00029I-UC; Fri, 12 Aug 2022 19:25:17 +0000 Received: by outflank-mailman (input) for mailman id 385864; Fri, 12 Aug 2022 19:25:16 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMaHU-0001lw-8p for xen-devel@lists.xenproject.org; Fri, 12 Aug 2022 19:25:16 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oMaHU-0000z9-5C; Fri, 12 Aug 2022 19:25:16 +0000 Received: from 54-240-197-224.amazon.com ([54.240.197.224] helo=dev-dsk-jgrall-1b-035652ec.eu-west-1.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oMaHT-0006n6-Te; Fri, 12 Aug 2022 19:25:16 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=iOLL1u2KoKBoa80MrMv6wujMJrVVx1Fxvbp2RjO3MMA=; b=f5qp8btfoRdImdkDqASaD7T85+ yj990o51158GqrHmrDZEDwMYd1ULtU8pkzcJy8NYeBrBcAqCHX3Ts2p1Ppw1jdv9HR+lu0EnvdCyQ 5PcKIr3v5TTdAk08OjvcQRJHoNGhxzUHr1bGhTYzlhBzSN8nxjnY4wQTAlIzTm7z5hMM=; From: Julien Grall To: xen-devel@lists.xenproject.org Cc: julien@xen.org, Julien Grall , Stefano Stabellini , Bertrand Marquis , Volodymyr Babchuk Subject: [PATCH 7/7] xen/arm32: traps: Dump more information for hypervisor data abort Date: Fri, 12 Aug 2022 20:24:47 +0100 Message-Id: <20220812192448.43016-9-julien@xen.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220812192448.43016-1-julien@xen.org> References: <20220812192448.43016-1-julien@xen.org> MIME-Version: 1.0 From: Julien Grall Unlike arm64, on arm32 there are no extra information dumped (e.g. page table walk) for hypervisor data abort. For data abort, the HSR will be set properly and so replace the call to do_unexpected_trap() with do_trap_hyp_sync() to dispatch the error. Signed-off-by: Julien Grall Reviewed-by: Henry Wang Reviewed-by: Bertrand Marquis --- xen/arch/arm/arm32/traps.c | 2 +- xen/arch/arm/include/asm/traps.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/arm32/traps.c b/xen/arch/arm/arm32/traps.c index a4ce2b92d904..a2fc1c22cbc9 100644 --- a/xen/arch/arm/arm32/traps.c +++ b/xen/arch/arm/arm32/traps.c @@ -81,7 +81,7 @@ void do_trap_data_abort(struct cpu_user_regs *regs) if ( VABORT_GEN_BY_GUEST(regs) ) do_trap_guest_serror(regs); else - do_unexpected_trap("Data Abort", regs); + do_trap_hyp_sync(regs); } void finalize_instr_emulation(const struct instr_details *instr) diff --git a/xen/arch/arm/include/asm/traps.h b/xen/arch/arm/include/asm/traps.h index 08bc0b484c75..883dae368eac 100644 --- a/xen/arch/arm/include/asm/traps.h +++ b/xen/arch/arm/include/asm/traps.h @@ -73,6 +73,7 @@ int do_bug_frame(const struct cpu_user_regs *regs, vaddr_t pc); void noreturn do_unexpected_trap(const char *msg, const struct cpu_user_regs *regs); +void do_trap_hyp_sync(struct cpu_user_regs *regs); /* Functions for pending virtual abort checking window. */ void abort_guest_exit_start(void);