Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp969274pxb; Fri, 22 Apr 2022 15:35:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8vNs64WKMxquONzuBvrrcwpm5knpD7l0ezus7XIrlQ8wtk5lHGdPtrZkbIELrjn7jn3qN X-Received: by 2002:a65:524b:0:b0:383:1b87:2d21 with SMTP id q11-20020a65524b000000b003831b872d21mr5710065pgp.482.1650666941015; Fri, 22 Apr 2022 15:35:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650666941; cv=none; d=google.com; s=arc-20160816; b=pjTB4uT1g6KKMoZvobOqrmcTpnpzlN/nVJ8vXyObowKs7AVJAxQN9yn/FV8Ig7rV8X wIkSga+6dfPfG0ZKWgbhs/8JoyRyHW/eHOzPhz5/vi5UtZxKO4nJI91UxCGD+x3P/35v /SJHFXNhp1687Nb+uqPLBnRC43OCRaR5d9OgS+PeARCqzrKzZVGa0mz4VdlmJ3NWbryL pX9JcG98Ey/AqQgAOtPrsha9R9VIJH6FXEyycU5DuT4dkJDDl7LHHeQ+w2WHceUl85mE xkspstvowk3+V8i9hyz1UNUpMBgHlDrBk10P6RuN+XoVyfeC6nOdQ4VO0x+CE+gjA2cT zFAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=LnGIcis/+oGsBPalX00iGSyRjxFol/BleW5/YO4EN/c=; b=ZWvPW5b6yAZuptVl0MlPunPiF11seI7uBpmiUD6EPVMioHX0J5nN648aCiW66YupIj 6MsODKiglVjGmiCbihcmDlfx+HubMk6+LaAO2+f1FZwflEODv0Wt/Ht8LotOVGhhTpgR AyPN1AIRdfxozdQN/+/58xMQvSonq/Jq3OAN/3jLpbmO0YawL7T9/yhJ1b3IYtExSoPb Dq/jlnB7XxfTUamBI85wmDCAWcBRT8BOwfl03oQK2dfwWJutJrx2OoNx1mgXBeuLzfdF Clmcpf6HBRNxDrfhg2JilExsA7f0uULw1vwODIYPe/pT3OV3Oup5DJ63057KomrsFDEH tlFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l15-20020a17090ac58f00b001c9fe7a87cesi10899315pjt.105.2022.04.22.15.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:35:41 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B81A265E5C; Fri, 22 Apr 2022 13:23:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387202AbiDUJDo (ORCPT + 99 others); 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: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.