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 86DABC43334 for ; Mon, 18 Jul 2022 16:58:31 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=j/2cUe9e7RRjpEVcJzCJj9Ak89F2E7YBUnrvlqIe2rA=; b=tfUvmvlEdZlYsW837fSm1s9gQJ 83ivt685JU2Tmm+JVdKOOXb3g+Qh7rBM5W4gt2pgN/h9J5bcQVGoLKQKSaN/1Eeb6+3NIYxK5KEpx Osc+LIaYAg3f4xtalZ43kH1+7/vz2EVafhra7/W1snNmy6u8fCzHL2XgUDVsMCE0T8qGf0NCxyX4e tjXCF/vcFRem4YqIeF0GNMA1ezpRpIDnfsVFvuHkOVPPfgzpVIp9Shd8+06nJSNhdFU+8g8SadpY+ obOn+jNzx3jr8jl7v1me0pnv35zI/QVjvWEzPOXd6epSZ6tdOacFzYSY1hAa4KSWVZ0i3Uny1sZWG W96mHqLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDU3q-00GvN5-LH; Mon, 18 Jul 2022 16:57:34 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDU3n-00GvKh-GX for linux-arm-kernel@lists.infradead.org; Mon, 18 Jul 2022 16:57:33 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 66CA1B8167E; Mon, 18 Jul 2022 16:57:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 113E5C341C0; Mon, 18 Jul 2022 16:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658163448; bh=AnJdj+qPEyjwaxmU5ymhWx17b9DtWL91rx0lNbaEJnI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JPyT0RynILtx2EUQmdMhPkGtYND7f66t4sOqBJzNqUnh932Y3l7aKdSRg8BSsRirV nLRrxRu4tZDl0flU0dmGh6/UhxNZUDmjVokIfXd+i77V1d6PEIaTEXtPfFmUInIYdO dC8wS4PXMqXygxngpliHXhhxIYEtQpLRkk3afxVmt70C4+Cx1+KW6NaYIe1gOr7FOV ifDY8Ge37q2QM/Y6/hToXlMykwUdZqimI5LDnQTpXgRfhH8VHEtfYFFYF5jl9b+XAp 0OibGdOE+30id4Th0KL0jbwwoQCvYfxFoUxZk0h+HAy5MwwtW9jhmT5AND3VdWszsO a9O2fTIZS1LKQ== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oDU3h-008GnX-MJ; Mon, 18 Jul 2022 17:57:25 +0100 MIME-Version: 1.0 Date: Mon, 18 Jul 2022 17:57:25 +0100 From: Marc Zyngier To: Kalesh Singh Cc: Mark Rutland , Mark Brown , "Madhavan T. Venkataraman" , Will Deacon , Quentin Perret , Fuad Tabba , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , andreyknvl@gmail.com, russell.king@oracle.com, vincenzo.frascino@arm.com, Masami Hiramatsu , Alexei Starovoitov , Kefeng Wang , Marco Elver , Keir Fraser , Zenghui Yu , Ard Biesheuvel , Oliver Upton , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , kvmarm , LKML , "Cc: Android Kernel" Subject: Re: [PATCH v4 11/18] KVM: arm64: Stub implementation of non-protected nVHE HYP stack unwinder In-Reply-To: References: <20220715061027.1612149-1-kaleshsingh@google.com> <20220715061027.1612149-12-kaleshsingh@google.com> <877d4a513o.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <54b1c642097af7d290174072bd6e856c@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: kaleshsingh@google.com, mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com, will@kernel.org, qperret@google.com, tabba@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, andreyknvl@gmail.com, russell.king@oracle.com, vincenzo.frascino@arm.com, mhiramat@kernel.org, ast@kernel.org, wangkefeng.wang@huawei.com, elver@google.com, keirf@google.com, yuzenghui@huawei.com, ardb@kernel.org, oupton@google.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220718_095731_881981_1A2225CB X-CRM114-Status: GOOD ( 25.60 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-07-18 17:51, Kalesh Singh wrote: > On Mon, Jul 18, 2022 at 12:31 AM Marc Zyngier wrote: >> >> On Fri, 15 Jul 2022 07:10:20 +0100, >> Kalesh Singh wrote: >> > >> > Add stub implementations of non-protected nVHE stack unwinder, for >> > building. These are implemented later in this series. >> > >> > Signed-off-by: Kalesh Singh >> > --- >> > arch/arm64/include/asm/stacktrace/nvhe.h | 22 ++++++++++++++++++++++ >> > 1 file changed, 22 insertions(+) >> > >> > diff --git a/arch/arm64/include/asm/stacktrace/nvhe.h b/arch/arm64/include/asm/stacktrace/nvhe.h >> > index 1eac4e57f2ae..36cf7858ddd8 100644 >> > --- a/arch/arm64/include/asm/stacktrace/nvhe.h >> > +++ b/arch/arm64/include/asm/stacktrace/nvhe.h >> > @@ -8,6 +8,12 @@ >> > * the HYP memory. The stack is unwinded in EL2 and dumped to a shared >> > * buffer where the host can read and print the stacktrace. >> > * >> > + * 2) Non-protected nVHE mode - the host can directly access the >> > + * HYP stack pages and unwind the HYP stack in EL1. This saves having >> > + * to allocate shared buffers for the host to read the unwinded >> > + * stacktrace. >> > + * >> > + * >> > * Copyright (C) 2022 Google LLC >> > */ >> > #ifndef __ASM_STACKTRACE_NVHE_H >> > @@ -53,5 +59,21 @@ static int notrace unwind_next(struct unwind_state *state) >> > NOKPROBE_SYMBOL(unwind_next); >> > #endif /* CONFIG_PROTECTED_NVHE_STACKTRACE */ >> > >> > +/* >> > + * Non-protected nVHE HYP stack unwinder >> > + */ >> > +#else /* !__KVM_NVHE_HYPERVISOR__ */ >> >> I don't get this path. This either represents the VHE hypervisor or >> the kernel proper. Which one is it? > > Hi Marc. This is run from kernel proper context. And it's the > unwinding for conventional nVHE (non-protected). The unwinding is done > from the host kernel in EL1. This really deserves a comment here, as the one you currently have is a bit misleading (and you probably want to move it below the #else). Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel