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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 347A1C433EF for ; Thu, 21 Apr 2022 09:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PgzXA92oq/9eSuHSDXFNsC84wHUzsCnmfNjsJG1m/Fs=; b=ECR7EmKGmNt4st ZecDptrDkbaJBR2OIDB4N50Tqb7tHEv2Qta5ZHoZSgX8T3lP0H6dyJMW8nNVYtdrI9NwsaOrmyEN3 4iZMQRXhoM2YefXETv+Ds8YNB9QP7hjw4dVe7FNKb9tg0Ozihl8EQffqndp2qvFcCTYxwKVNrLJRR KmMsxrX2MBq61DCWyPhXY0ruymHc+mKLiRZK+292vJdtm0tJZQ9+ZwDNV53DZ3Umq+ciBsvPdZQMi LT9rItvbXFY5UFvXeRL2SAc9FTwIqK2TVE1pVFrog4pawx5QfNfnB8LkobQG9WBvFYxINX3hxm9iA WCsQO8H416zkM4X7lCnw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhSgI-00CZZZ-2C; Thu, 21 Apr 2022 09:00:54 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhSgE-00CZVE-E4 for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 09:00:51 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_020050_563869_80B152A2 X-CRM114-Status: GOOD ( 15.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel