Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3571650imw; Mon, 18 Jul 2022 10:25:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s+IwLuBfTCe308+tsnlcE2YwoRr6NGPDmPEJeczr+5K2wi5TWoIUZW+oADdhZsTf3kf4F+ X-Received: by 2002:a17:906:6a21:b0:72f:2174:16e6 with SMTP id qw33-20020a1709066a2100b0072f217416e6mr8253581ejc.177.1658165138577; Mon, 18 Jul 2022 10:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658165138; cv=none; d=google.com; s=arc-20160816; b=HsOx0V/j1qKoMHsPjgkCF4RDcITpF0yFkZGU4VqahEPBsqn8/1bPZm/VFhYiHEOaFZ IHUYgngK3P59O2zImT0skhJXni1c72Tv0Gr0Kogpm9/oNpOOanda1uMdpROKg6qp8/2X 4Wy2DivQSNKQURFeTvNIhOue7Jvq62QMwgk5uFy0pkWqhugobDRedbUzAs3r6CLW4WPF AB0gSqaJS+RhlGWOjJqC+0Ia0Kdcl9gdQoJXyWi9+Hg3UGiZpd3IC47DtRt+Uvyl0iyz Fd7CW1KwhuJGRjFroq4Xwbt/S8nbMuTGZQhmRwJqd0mYbAKrQYqyVeF7rCxR1zXrtJhn EQvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=PAbDl1PRM5nJcEKcI6Ytvs7hiGOzTQVF+JIk15dOA88=; b=yXhEKvAQ4+sF+gwAox2Pc8KQ1azEwdi8+KpV64GKbp820W03RpRHL/uncfeUTB2ajj 9A2jGt/7tC7n7khEVIMeMu+lPzdShqq9Tvjc6uP80Vc2SLtyWunrQHMHZWK8RoloyX5q EPARz1FSnZ20v+cdtixaDTdhVVUrfi9uRQIoej2m2Z1U3vWBL2AiluGDyrLRvQefMTEn SHXiADMo/H/meWrD5VG4GNqLWTem3/ko+eCu/dkT9ugjN25pvV3uPUtF1LHB6nEZ4WBK lpQGODvqnrhHq7IUGdij/4IH1G3IyvE+n5wl3cZ/baZyUgfmFpWf4ngaQHw+S6Tt8LGb CJjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=n5udodEA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne35-20020a1709077ba300b006febfa8bf0asi10770366ejc.509.2022.07.18.10.25.12; Mon, 18 Jul 2022 10:25:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=n5udodEA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234297AbiGRQvz (ORCPT + 99 others); Mon, 18 Jul 2022 12:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbiGRQvx (ORCPT ); Mon, 18 Jul 2022 12:51:53 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A31F2B19C for ; Mon, 18 Jul 2022 09:51:52 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id b26so17958123wrc.2 for ; Mon, 18 Jul 2022 09:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PAbDl1PRM5nJcEKcI6Ytvs7hiGOzTQVF+JIk15dOA88=; b=n5udodEAa/PhqseWRA+ZivosTL+aHxlWiMaVXsWsHZeKg72WFl+q1bjcvEIKJGsXbs RPtworRU8Nh1Cwv3GXk0n/mYI4XiC1YfEuJnfhNedphfctJ327KC83r8YiDGb/sBkL+E XmUeJXLrY9YW/3OUjWA9vNqnCvnqNxrPg15pTeOicsw3EyemCxVJP4y1v7l++F+xEAOJ 2su/h+SGAbOfp1TCEcaP+E8bUk2BQFUxLbYPsl3W8zNRYhyNQdQkm6aF1qWD1BxKDxb4 KvaUN4IuTL+e3uuThg2ACcxOutr+PidsEjVo0kigDgA+GaX5R1S87jJUM6Wdlx4D2tfT DnFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PAbDl1PRM5nJcEKcI6Ytvs7hiGOzTQVF+JIk15dOA88=; b=bLU5B3IkKj/S/Kg3plMQFWLYIYB0ktNU++AHIZ9cDt9+SJXH8or183xzcrPfYvOZqC AIodbdQNUfcr8ouf5yfRWCFoUW19t+8HZZuBefmoQABkxj+UOB3QmeO3qpBaMylYgV5H /aGl56EFx21HSwxHvKtNDf0XcTRMAKTLSsUlEFKWZPPQOfnSHYiVReeRt90rds+pd2sJ abiApEkJEOfJpjLBoo7R4myz6umSfLGMmpU1CmUgd9u6WSbX+Vw8UGYemvbVAg4j8CgF mZGuYAEg1osLxKrlndebmBZme16UPE9xi5l3nu1h2x8GXCS30tZaePFDay3bdirQeegj jk5Q== X-Gm-Message-State: AJIora94SG3yXinFRKSZHRSXewFTcGGqFL21yxj3b7D0OOhjKk5wx52U QjrYiQY1d+9ssCZdslySeFNGPrFmfXjkTiONm3In8Q== X-Received: by 2002:a5d:6c65:0:b0:21d:b7c0:9930 with SMTP id r5-20020a5d6c65000000b0021db7c09930mr23007398wrz.500.1658163110612; Mon, 18 Jul 2022 09:51:50 -0700 (PDT) MIME-Version: 1.0 References: <20220715061027.1612149-1-kaleshsingh@google.com> <20220715061027.1612149-12-kaleshsingh@google.com> <877d4a513o.wl-maz@kernel.org> In-Reply-To: <877d4a513o.wl-maz@kernel.org> From: Kalesh Singh Date: Mon, 18 Jul 2022 09:51:39 -0700 Message-ID: Subject: Re: [PATCH v4 11/18] KVM: arm64: Stub implementation of non-protected nVHE HYP stack unwinder To: Marc Zyngier 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" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 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. > > > +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. > > -- > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. >