All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalesh Singh <kaleshsingh@google.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Alexei Starovoitov <ast@kernel.org>,
	will@kernel.org, kvmarm@lists.cs.columbia.edu, maz@kernel.org,
	"Madhavan T. Venkataraman" <madvenka@linux.microsoft.com>,
	linux-arm-kernel@lists.infradead.org, kernel-team@android.com,
	surenb@google.com, Mark Brown <broonie@kernel.org>,
	Peter Collingbourne <pcc@google.com>,
	linux-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: [PATCH 0/4] KVM nVHE Hypervisor stack unwinder
Date: Wed, 27 Apr 2022 11:46:55 -0700	[thread overview]
Message-ID: <20220427184716.1949239-1-kaleshsingh@google.com> (raw)

Hi all,

This series is based on arm64 for-next/core and is also dependent
on the series at [1].

A previous version of hypervisor stack unwinding was included
in the series at [2].

This new version of the unwinder splits the unwinding and dumping
of the stack between the hypervisor and host:
  - The hyperviosr unwinds its stack and dumps the address entries
    into a page shared with the host.
  - The host then symnolizes and prints the hyp stacktrace from
    the shared page.

The new approach doesn't depend on CONFIG_NVHE_EL2_DEBUG,
and allows dumping hyp stacktraces in prodcution environments
(!CONFIG_NVHE_EL2_DEBUG).

arm64/kernel/stacktrace.c is compiled twice: stacktrace.o for the
host kernel and stacktrace.nvhe.o for the hypervisor: This allows
reusing most of the host unwinding logic in the nVHE hypervisor.

[1] https://lore.kernel.org/r/20220420214317.3303360-1-kaleshsingh@google.com/
[2] https://lore.kernel.org/r/20220314200148.2695206-1-kaleshsingh@google.com/

Thanks,
Kalesh


Kalesh Singh (4):
  KVM: arm64: Compile stacktrace.nvhe.o
  KVM: arm64: Add hypervisor overflow stack
  KVM: arm64: Allocate shared stacktrace pages
  KVM: arm64: Unwind and dump nVHE hypervisor stacktrace

 arch/arm64/include/asm/kvm_asm.h    |   1 +
 arch/arm64/include/asm/stacktrace.h |  58 +++++++++--
 arch/arm64/kernel/stacktrace.c      | 151 +++++++++++++++++++++++-----
 arch/arm64/kvm/arm.c                |  34 +++++++
 arch/arm64/kvm/handle_exit.c        |   4 +
 arch/arm64/kvm/hyp/nvhe/Makefile    |   3 +-
 arch/arm64/kvm/hyp/nvhe/host.S      |   9 +-
 arch/arm64/kvm/hyp/nvhe/setup.c     |  11 ++
 arch/arm64/kvm/hyp/nvhe/switch.c    |   4 +
 9 files changed, 231 insertions(+), 44 deletions(-)

-- 
2.36.0.rc2.479.g8af0fa9b8e-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Kalesh Singh <kaleshsingh@google.com>
Cc: mark.rutland@arm.com, will@kernel.org, maz@kernel.org,
	qperret@google.com,  tabba@google.com, surenb@google.com,
	kernel-team@android.com,  Kalesh Singh <kaleshsingh@google.com>,
	James Morse <james.morse@arm.com>,
	 Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	 Catalin Marinas <catalin.marinas@arm.com>,
	Mark Brown <broonie@kernel.org>,
	 Masami Hiramatsu <mhiramat@kernel.org>,
	Peter Collingbourne <pcc@google.com>,
	 Alexei Starovoitov <ast@kernel.org>,
	"Madhavan T. Venkataraman" <madvenka@linux.microsoft.com>,
	 Andrew Jones <drjones@redhat.com>,
	Keir Fraser <keirf@google.com>, Zenghui Yu <yuzenghui@huawei.com>,
	 Kefeng Wang <wangkefeng.wang@huawei.com>,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] KVM nVHE Hypervisor stack unwinder
Date: Wed, 27 Apr 2022 11:46:55 -0700	[thread overview]
Message-ID: <20220427184716.1949239-1-kaleshsingh@google.com> (raw)

Hi all,

This series is based on arm64 for-next/core and is also dependent
on the series at [1].

A previous version of hypervisor stack unwinding was included
in the series at [2].

This new version of the unwinder splits the unwinding and dumping
of the stack between the hypervisor and host:
  - The hyperviosr unwinds its stack and dumps the address entries
    into a page shared with the host.
  - The host then symnolizes and prints the hyp stacktrace from
    the shared page.

The new approach doesn't depend on CONFIG_NVHE_EL2_DEBUG,
and allows dumping hyp stacktraces in prodcution environments
(!CONFIG_NVHE_EL2_DEBUG).

arm64/kernel/stacktrace.c is compiled twice: stacktrace.o for the
host kernel and stacktrace.nvhe.o for the hypervisor: This allows
reusing most of the host unwinding logic in the nVHE hypervisor.

[1] https://lore.kernel.org/r/20220420214317.3303360-1-kaleshsingh@google.com/
[2] https://lore.kernel.org/r/20220314200148.2695206-1-kaleshsingh@google.com/

Thanks,
Kalesh


Kalesh Singh (4):
  KVM: arm64: Compile stacktrace.nvhe.o
  KVM: arm64: Add hypervisor overflow stack
  KVM: arm64: Allocate shared stacktrace pages
  KVM: arm64: Unwind and dump nVHE hypervisor stacktrace

 arch/arm64/include/asm/kvm_asm.h    |   1 +
 arch/arm64/include/asm/stacktrace.h |  58 +++++++++--
 arch/arm64/kernel/stacktrace.c      | 151 +++++++++++++++++++++++-----
 arch/arm64/kvm/arm.c                |  34 +++++++
 arch/arm64/kvm/handle_exit.c        |   4 +
 arch/arm64/kvm/hyp/nvhe/Makefile    |   3 +-
 arch/arm64/kvm/hyp/nvhe/host.S      |   9 +-
 arch/arm64/kvm/hyp/nvhe/setup.c     |  11 ++
 arch/arm64/kvm/hyp/nvhe/switch.c    |   4 +
 9 files changed, 231 insertions(+), 44 deletions(-)

-- 
2.36.0.rc2.479.g8af0fa9b8e-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Kalesh Singh <kaleshsingh@google.com>
To: unlisted-recipients:; (no To-header on input)
Cc: mark.rutland@arm.com, will@kernel.org, maz@kernel.org,
	qperret@google.com, tabba@google.com, surenb@google.com,
	kernel-team@android.com, Kalesh Singh <kaleshsingh@google.com>,
	James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Mark Brown <broonie@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Peter Collingbourne <pcc@google.com>,
	Alexei Starovoitov <ast@kernel.org>,
	"Madhavan T. Venkataraman" <madvenka@linux.microsoft.com>,
	Andrew Jones <drjones@redhat.com>, Keir Fraser <keirf@google.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] KVM nVHE Hypervisor stack unwinder
Date: Wed, 27 Apr 2022 11:46:55 -0700	[thread overview]
Message-ID: <20220427184716.1949239-1-kaleshsingh@google.com> (raw)

Hi all,

This series is based on arm64 for-next/core and is also dependent
on the series at [1].

A previous version of hypervisor stack unwinding was included
in the series at [2].

This new version of the unwinder splits the unwinding and dumping
of the stack between the hypervisor and host:
  - The hyperviosr unwinds its stack and dumps the address entries
    into a page shared with the host.
  - The host then symnolizes and prints the hyp stacktrace from
    the shared page.

The new approach doesn't depend on CONFIG_NVHE_EL2_DEBUG,
and allows dumping hyp stacktraces in prodcution environments
(!CONFIG_NVHE_EL2_DEBUG).

arm64/kernel/stacktrace.c is compiled twice: stacktrace.o for the
host kernel and stacktrace.nvhe.o for the hypervisor: This allows
reusing most of the host unwinding logic in the nVHE hypervisor.

[1] https://lore.kernel.org/r/20220420214317.3303360-1-kaleshsingh@google.com/
[2] https://lore.kernel.org/r/20220314200148.2695206-1-kaleshsingh@google.com/

Thanks,
Kalesh


Kalesh Singh (4):
  KVM: arm64: Compile stacktrace.nvhe.o
  KVM: arm64: Add hypervisor overflow stack
  KVM: arm64: Allocate shared stacktrace pages
  KVM: arm64: Unwind and dump nVHE hypervisor stacktrace

 arch/arm64/include/asm/kvm_asm.h    |   1 +
 arch/arm64/include/asm/stacktrace.h |  58 +++++++++--
 arch/arm64/kernel/stacktrace.c      | 151 +++++++++++++++++++++++-----
 arch/arm64/kvm/arm.c                |  34 +++++++
 arch/arm64/kvm/handle_exit.c        |   4 +
 arch/arm64/kvm/hyp/nvhe/Makefile    |   3 +-
 arch/arm64/kvm/hyp/nvhe/host.S      |   9 +-
 arch/arm64/kvm/hyp/nvhe/setup.c     |  11 ++
 arch/arm64/kvm/hyp/nvhe/switch.c    |   4 +
 9 files changed, 231 insertions(+), 44 deletions(-)

-- 
2.36.0.rc2.479.g8af0fa9b8e-goog


             reply	other threads:[~2022-04-27 18:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 18:46 Kalesh Singh [this message]
2022-04-27 18:46 ` [PATCH 0/4] KVM nVHE Hypervisor stack unwinder Kalesh Singh
2022-04-27 18:46 ` Kalesh Singh
2022-04-27 18:46 ` [PATCH 1/4] KVM: arm64: Compile stacktrace.nvhe.o Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-29 12:47   ` Mark Brown
2022-04-29 12:47     ` Mark Brown
2022-04-29 12:47     ` Mark Brown
2022-04-29 16:25     ` Kalesh Singh
2022-04-29 16:25       ` Kalesh Singh
2022-04-29 16:25       ` Kalesh Singh
2022-04-27 18:46 ` [PATCH 2/4] KVM: arm64: Add hypervisor overflow stack Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-27 18:46 ` [PATCH 3/4] KVM: arm64: Allocate shared stacktrace pages Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-27 18:46 ` [PATCH 4/4] KVM: arm64: Unwind and dump nVHE hypervisor stacktrace Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-27 18:46   ` Kalesh Singh
2022-04-29 13:24   ` Mark Brown
2022-04-29 13:24     ` Mark Brown
2022-04-29 13:24     ` Mark Brown

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=20220427184716.1949239-1-kaleshsingh@google.com \
    --to=kaleshsingh@google.com \
    --cc=ast@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-team@android.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madvenka@linux.microsoft.com \
    --cc=maz@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=pcc@google.com \
    --cc=surenb@google.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.