public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <andrew.jones@linux.dev>
To: Nadav Amit <nadav.amit@gmail.com>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
	Nikos Nikoleris <nikos.nikoleris@arm.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>, Nadav Amit <namit@vmware.com>
Subject: Re: [kvm-unit-tests PATCH v3 0/6] arm64: improve debuggability
Date: Sat, 1 Jul 2023 14:19:55 +0200	[thread overview]
Message-ID: <20230701-dccaf2ea1b37017f542857ee@orel> (raw)
In-Reply-To: <20230628001356.2706-2-namit@vmware.com>

On Wed, Jun 28, 2023 at 12:13:49AM +0000, Nadav Amit wrote:
> From: Nadav Amit <namit@vmware.com>
> 
> My recent experience in debugging ARM64 tests on EFI was not as fun as I
> expected it to be.
> 
> There were several reasons for that besides the questionable definition
> of "fun":
> 
> 1. ARM64 is not compiled with frame pointers and there is no stack
>    unwinder when the stack is dumped.
> 
> 2. Building an EFI drops the debug information.
> 
> 3. The addresses that are printed on dump_stack() and the use of GDB
>    are hard because taking code relocation into account is non trivial.
> 
> The patches help both ARM64 and EFI for this matter. The image address
> is printed when EFI is used to allow the use of GDB. Symbols are emitted
> into a separate debug file. The frame pointer is included and special
> entry is added upon an exception to allow backtracing across
> exceptions.
> 
> [ PowerPC: Please ack patches 1,2 ]
> [ x86: Please ack patches 1,2,5 ]
> 
> v2->v3:
> * Consider PowerPC for reloc and related fixes [Andrew]
> 
> v1->v2:
> * Andrew comments [see in individual patches]
> * Few cleanups
> 
> Nadav Amit (6):
>   efi: keep efi debug information in a separate file
>   lib/stack: print base addresses on relocation setups
>   arm64: enable frame pointer and support stack unwinding
>   arm64: stack: update trace stack on exception
>   efi: print address of image
>   arm64: dump stack on bad exception
> 
>  .gitignore              |  1 +
>  Makefile                |  2 +-
>  arm/Makefile.arm        |  3 --
>  arm/Makefile.arm64      |  2 ++
>  arm/Makefile.common     |  8 +++++-
>  arm/cstart64.S          | 13 +++++++++
>  lib/arm64/asm-offsets.c |  6 +++-
>  lib/arm64/asm/stack.h   |  3 ++
>  lib/arm64/processor.c   |  1 +
>  lib/arm64/stack.c       | 62 +++++++++++++++++++++++++++++++++++++++++
>  lib/efi.c               |  4 +++
>  lib/stack.c             | 31 +++++++++++++++++++--
>  powerpc/Makefile.common |  1 +
>  x86/Makefile.common     |  5 +++-
>  14 files changed, 133 insertions(+), 9 deletions(-)
>  create mode 100644 lib/arm64/stack.c
> 
> -- 
> 2.34.1
>

Merged. arm64 backtraces will be really nice to have!

Thanks, Nadav!

drew

  reply	other threads:[~2023-07-01 12:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28  0:13 [PATCH] .debug ignore - to squash with efi:keep efi Nadav Amit
2023-06-28  0:13 ` [kvm-unit-tests PATCH v3 0/6] arm64: improve debuggability Nadav Amit
2023-07-01 12:19   ` Andrew Jones [this message]
2023-06-28  0:13 ` [kvm-unit-tests PATCH v3 1/6] efi: keep efi debug information in a separate file Nadav Amit
2023-06-28  0:13 ` [kvm-unit-tests PATCH v3 2/6] lib/stack: print base addresses on relocation setups Nadav Amit
2023-07-01 11:34   ` Andrew Jones
2023-07-01 17:18     ` Nadav Amit
2023-06-28  0:13 ` [kvm-unit-tests PATCH v3 3/6] arm64: enable frame pointer and support stack unwinding Nadav Amit
2023-06-28  0:13 ` [kvm-unit-tests PATCH v3 4/6] arm64: stack: update trace stack on exception Nadav Amit
2023-06-28  0:13 ` [kvm-unit-tests PATCH v3 5/6] efi: print address of image Nadav Amit
2023-06-28  0:13 ` [kvm-unit-tests PATCH v3 6/6] arm64: dump stack on bad exception Nadav Amit
2023-06-28  8:19 ` [PATCH] .debug ignore - to squash with efi:keep efi Andrew Jones
2023-06-28  8:22   ` Andrew Jones
2023-06-28 17:30     ` Nadav Amit
2023-06-28 17:33       ` Nadav Amit
2023-06-29  7:43         ` Andrew Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230701-dccaf2ea1b37017f542857ee@orel \
    --to=andrew.jones@linux.dev \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=nadav.amit@gmail.com \
    --cc=namit@vmware.com \
    --cc=nikos.nikoleris@arm.com \
    --cc=pbonzini@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox