From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 206EEC433FE for ; Thu, 21 Apr 2022 09:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387222AbiDUJDo (ORCPT ); Thu, 21 Apr 2022 05:03:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387211AbiDUJDi (ORCPT ); Thu, 21 Apr 2022 05:03:38 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B9D9722506 for ; Thu, 21 Apr 2022 02:00:46 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 256611477; Thu, 21 Apr 2022 02:00:46 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.76.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DD1C03F766; Thu, 21 Apr 2022 02:00:42 -0700 (PDT) Date: Thu, 21 Apr 2022 10:00:36 +0100 From: Mark Rutland To: Kalesh Singh Cc: Fuad Tabba , Will Deacon , Marc Zyngier , Quentin Perret , Suren Baghdasaryan , "Cc: Android Kernel" , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Mark Brown , Masami Hiramatsu , Peter Collingbourne , "Madhavan T. Venkataraman" , Stephen Boyd , Andrew Walbran , Andrew Scull , Ard Biesheuvel , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , kvmarm , LKML Subject: Re: [PATCH v6 7/8] KVM: arm64: Unwind and dump nVHE HYP stacktrace Message-ID: References: <20220314200148.2695206-1-kaleshsingh@google.com> <20220314200148.2695206-8-kaleshsingh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 19, 2022 at 10:37:56AM -0700, Kalesh Singh wrote: > On Wed, Apr 13, 2022 at 6:59 AM Mark Rutland wrote: > > I'm fine with the concept of splitting the unwind and logging steps; this is > > akin to doing: > > > > stack_trace_save_tsk(...); > > ... > > stack_trace_print(...); > > > > ... and I'm fine with having a stack_trace_save_hyp(...) variant. > > > > However, I would like to ensure that we're reusing logic rather than > > duplicating it wholesale. > > Agreed. Although some reimplementation may be unavoidable, as we can't > safely link against kernel code from the protected KVM hypervisor. Sure; I just mean that we have one implementation, even if that gets recompiled in separate objects for different contexts. > Perhaps we can move some of the common logic to a shared header that > can be included in both places (host, hyp), WDYT? My rough thinking was that we'd build the same stacktrace.c file (reworked from the current one) as stracktrace.o and stacktrace.nvhe.o, but moving things around into headers is also an option. Either way will need some experimentation. Thanks, Mark.