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 43F55C433EF for ; Mon, 18 Jul 2022 07:32:18 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9eE2t2d/+ard+i8BheUdMPM0rYFNi98FM+ItcepqMvA=; b=IoblbZL4mVNQsq Z3SWZAKKQSS4RsAZIcMGRzDlpSFUN0Nhsa0yPgzzm1oWTF2tvwHXd6IZZseBcj7qVyiFViapPqyM2 rz2GNUwkbSdflddhALZevzdUZzv9QhhNoAAa60RZG+22Cam0kNyBHuamCaKsbow0zICppJ3d5EGzf A3Z+X/ayMI2Iq/g+zYu5zLfTZFRaPU4mXWO+71rEN99B27R3Qkqdg1q7B9J9OybeoqCFkQgUGRUqN X4PGcxDTiTv3vkbW/ZaEdM+wyZD9C7cZp9EqkJN8a1dune/a5TrWUOYH4aHpVtyJecR8I8ALkBCsV i/8A7i84tWb10zsy2TLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDLDi-00BUJj-P9; Mon, 18 Jul 2022 07:31:10 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDLDe-00BUHp-O2 for linux-arm-kernel@lists.infradead.org; Mon, 18 Jul 2022 07:31:08 +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 dfw.source.kernel.org (Postfix) with ESMTPS id B13A060FBD; Mon, 18 Jul 2022 07:31:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C115C341C0; Mon, 18 Jul 2022 07:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658129465; bh=DyGORClHzu6C8JR5WaLhDs42Jqg9N7GmhXlXTrbaLhE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=O1PfYO0HlJ1CpXoE8mak09OaqWh7UJ8uDiPmTck+0ZbZW07RDdC4/lpL/rBgNBwwm dfsVfNm57IxV/NdtRLQioQFtM2DQqpsTrY4nYuxcj1WcKVXdBOW5Iz3UfX5TkCm8I4 RD7BWAi/Y48LFHuoZLjd3NkFPdee1KuO0XYHUiKMpGbGg50eGBdZT/ETl0keuKiRAl Xuf5gINglPvszBBLRaxIiIWVlkB6KeNYSwz9YfELWUcz3rOwwbUIFSIAlmjZBU1yg7 SSa+3g2Ya8eI7MYJ4yo8z1Ipd8OqogqdnOLGMJZubbDW+jW3T2ufPgYx7Vzjgrt6MJ Jyg7jzY/UA0pw== Received: from 82-132-227-210.dab.02.net ([82.132.227.210] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oDLDa-0088Zv-EP; Mon, 18 Jul 2022 08:31:03 +0100 Date: Mon, 18 Jul 2022 08:30:51 +0100 Message-ID: <877d4a513o.wl-maz@kernel.org> From: Marc Zyngier To: Kalesh Singh Cc: 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 Subject: Re: [PATCH v4 11/18] KVM: arm64: Stub implementation of non-protected nVHE HYP stack unwinder In-Reply-To: <20220715061027.1612149-12-kaleshsingh@google.com> References: <20220715061027.1612149-1-kaleshsingh@google.com> <20220715061027.1612149-12-kaleshsingh@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 82.132.227.210 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_003106_882684_BA7D6C38 X-CRM114-Status: GOOD ( 25.67 ) 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 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? > +static inline bool on_overflow_stack(unsigned long sp, unsigned long size, > + struct stack_info *info) > +{ > + return false; > +} > + > +static int notrace unwind_next(struct unwind_state *state) > +{ > + return 0; > +} > +NOKPROBE_SYMBOL(unwind_next); > + > #endif /* __KVM_NVHE_HYPERVISOR__ */ > #endif /* __ASM_STACKTRACE_NVHE_H */ Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel