Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3030677imw; Mon, 18 Jul 2022 00:07:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tFCzrNoUYaNxO8a8peSuDpJuo12yRyIZjA+068ELyD0T8XBoxjgQiVEwSCYl2K9QxPvKdT X-Received: by 2002:a17:902:f544:b0:16c:5119:d4b6 with SMTP id h4-20020a170902f54400b0016c5119d4b6mr26466784plf.28.1658128068130; Mon, 18 Jul 2022 00:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658128068; cv=none; d=google.com; s=arc-20160816; b=A7PQmqOn/1EtjqbXmBI0yiz86ETz0SebbjjgCgC2ltUuAIyeTbsTDUBhYBIQ65ujs0 jugZX0DoJgStGz03IbImYwNSSN8HC0gl0FPyGNxnrejGxfHXycjNkOsgNX+mefpw2fvX JuKfc1nxotTrsH6PHabwkB2nUkJIrzIJ9TBiOQ0CK+S/Vk+LhVpSCvV73CIqaMg7+hrY kVkB0pQxtQ2uNFnaN7YIuQjkv4c7EJtoicvZjNB5mvAA+OFAWanIzeigABrerKviiuTd PcY+8VNR6mNJCamIqsL8pFD3vBFRRAA4e67FHXGL1elfJsO/kTaoqSoVsAQRAsZ5rMNm cHtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=a5TwH8StHzOhjs7Ltey5zcPveku09zOFk9JTMDgdGZ0=; b=HIZyYZzQRVVZFOZXGZfMQvHZDkQ0C0hpZW2gTyMcvtBcBCuLPi01w3GBkqG4HelVLn Vz0CeZgKbVMw8Ja6sO1M+ezJlI89pwQbiPHaDlr3aGjhzJumo+/78G34kM8IQSEBkWFb lZR7VrOwUtGSdEf/V7i8PfLrtfqPvBtql0hHMKfEWfirBy0TCG5d5ld4FF5T8Be5YCmK cE6HvFmnyBi5sX9iLY9DGpN5ol4dix6grx8u91S/cQ8ihKL7Wqx0CgiVeM4XqJVRsMbv 6BirvQM/bk8M5cfGk0TLp2Wn08wgeackdfiCcbq5c1ISUQ329kUHBQrPQVE0fpasWRti jAfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jCIW4Qge; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j71-20020a638b4a000000b00419de8c08ccsi1833272pge.588.2022.07.18.00.07.32; Mon, 18 Jul 2022 00:07:48 -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=@kernel.org header.s=k20201202 header.b=jCIW4Qge; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233610AbiGRGz7 (ORCPT + 99 others); Mon, 18 Jul 2022 02:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233607AbiGRGz6 (ORCPT ); Mon, 18 Jul 2022 02:55:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 328AF13D78 for ; Sun, 17 Jul 2022 23:55:57 -0700 (PDT) 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 BE4B2612ED for ; Mon, 18 Jul 2022 06:55:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FD6CC341C0; Mon, 18 Jul 2022 06:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658127356; bh=40HSFVKrievXEEZlinu6PVUqYOcnH5q0Oq33vn9Lwjo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jCIW4Qgexksy/SJrcSNfrRR68t3p3TVKpL99DlukG154BeFzBHhGrMlWRvC8bqj/G kEYF6yh7/OFtFP+bPNQaGBivbBlnyih60DH1v6KIHgk+vhwrUam5ZtUY5eoK4AsB11 3CFKef7mF0hvinUab37XGKI7unbYDbeThU9q/KjyPQfW3RcHXyeyxCbaFU3W5MRmuc I2u6EEUH9KgiL/8hPx8+5KvSEf7Gsr/4pjOJP+AoyRtbwKp/tY2RDKzf36i2V+kIk1 LxHJnsvHOQYMQGOqschrCmaMB2ZDdaCJKXNGr5ehISY91UsuUM14dLLDmp722VJpxG 7Xqc7Lj/wZldA== 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 1oDKfZ-0088CH-Th; Mon, 18 Jul 2022 07:55:54 +0100 Date: Mon, 18 Jul 2022 07:55:44 +0100 Message-ID: <87cze252q7.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 08/18] KVM: arm64: Add PROTECTED_NVHE_STACKTRACE Kconfig In-Reply-To: <20220715061027.1612149-9-kaleshsingh@google.com> References: <20220715061027.1612149-1-kaleshsingh@google.com> <20220715061027.1612149-9-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") Content-Type: text/plain; charset=US-ASCII 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-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 [- Drew and android-mm, as both addresses bounce] On Fri, 15 Jul 2022 07:10:17 +0100, Kalesh Singh wrote: > > This can be used to disable stacktrace for the protected KVM > nVHE hypervisor, in order to save on the associated memory usage. > > This option is disabled by default, since protected KVM is not widely > used on platforms other than Android currently. > > Signed-off-by: Kalesh Singh > --- > arch/arm64/kvm/Kconfig | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig > index 8a5fbbf084df..1edab6f8a3b8 100644 > --- a/arch/arm64/kvm/Kconfig > +++ b/arch/arm64/kvm/Kconfig > @@ -46,6 +46,21 @@ menuconfig KVM > > If unsure, say N. > > +config PROTECTED_NVHE_STACKTRACE > + bool "Protected KVM hypervisor stacktraces" > + depends on KVM > + default n > + help > + Say Y here to enable pKVM hypervisor stacktraces on hyp_panic() > + > + If you are not using protected nVHE (pKVM), say N. > + > + If using protected nVHE mode, but cannot afford the associated > + memory cost (less than 0.75 page per CPU) of pKVM stacktraces, > + say N. > + > + If unsure, say N. > + Can we make this depend on NVHE_EL2_DEBUG instead? I'd like to keep the disclosing of EL2 information in protected mode a strict debug feature. > config NVHE_EL2_DEBUG > bool "Debug mode for non-VHE EL2 object" > depends on KVM Thanks, M. -- Without deviation from the norm, progress is not possible.