Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp569389imn; Tue, 26 Jul 2022 03:51:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ubCDqmkBeWIzgAvTq2gk2oe+IyzKK2SWtZXMx1EPwpZ2pcNN01DHDpQxg/Cjhwa0S+LigZ X-Received: by 2002:a17:907:3e29:b0:72f:84c2:fafc with SMTP id hp41-20020a1709073e2900b0072f84c2fafcmr13153066ejc.93.1658832705375; Tue, 26 Jul 2022 03:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658832705; cv=none; d=google.com; s=arc-20160816; b=dqNm8mrbb5frIMUjaMfE5IfW9x5djxXH83lmuLWxLtn3qV/9CZ8UmUwDpiYXtMqOWs gpf67dCUe17HqpXTrE33mpGDHGlKMuqZX8EI9hT2JE4JBimnZXIwtGhOGZfMVpMqhzVV 0LzO9rKevAOmj9Pq2M+0iTxebSpOTiMgnMq6hMwtqcWgqOXypGX9zFsO1lfQ3o0WRvdv ql1e2FCtLZwN9s0a6/MTo5BxJh9XB9QcaWC0BpqmU/tqEfZ76igbfOpBk1M735znniWU c4iSuvYbHi3fWK+pZC9uHQTY3sl5urCdXH5pgYr1xcdfNdgQaIEBezQD6NURl4xakpAW +jew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=vMmhuSkV4WOpKe+jZ1PJ06BOTzuFKnnyXNyfXS98f8A=; b=LBGT+lhRqUuWMNRA7KwqYF/hyOYQ4bN5uLuEDNvnQ9VWITZLbiR1dirJHQGKjxLuxU sipW8Vlo3KFySRGQ/YD2zNuHUkk9EQB86zGumM3vO0RoKp1/u6dWfsZFrqj8Ngce8XeS p+3QZW5x0L54dAR1Wkz2yx99MsyIGNxUMcZvWJjl6BTDxTNN9lG+IAyvVQYLEmUbGl21 UP0F3ByWNum+LJ7pOmBidyFdGPOXXRW26bkT3qTsB1U+Pb53sC5AuW9hnauW3YJ65lIe 7t6Yk7PcG9AB6u1y6nJS9D8lC98r5YQ1NZDGZZrR9bv1Fcta7X3QKzknPEVoGUM6rC4m RIjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GOf5SmE4; 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 d14-20020a1709067f0e00b0072b5ad7eee8si13482853ejr.966.2022.07.26.03.51.20; Tue, 26 Jul 2022 03:51:45 -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=GOf5SmE4; 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 S237522AbiGZKAc (ORCPT + 99 others); Tue, 26 Jul 2022 06:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232558AbiGZKA1 (ORCPT ); Tue, 26 Jul 2022 06:00:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DE039589 for ; Tue, 26 Jul 2022 03:00:25 -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 C5399615CD for ; Tue, 26 Jul 2022 10:00:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B096C341C0; Tue, 26 Jul 2022 10:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658829624; bh=lVR454/l8b9nh35sqhdWBxPKaE+Kv5ClI+XinX72svY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GOf5SmE4BZFpHTm6PQb6Aome4X/MvjdlYbEAgGBqFm8lJuEAn8958GavDeHoF9MXA +fXbhsWjZ+gSsNaICj/kPuMWScev/6w7EKtRhdQ505jGW1m5rEllHBZ9ybkWIjoOz1 c3q4cm40QlIHR14ra9jRa/Owk1cJITYS4Qz1hMJgxJUQPW//xBF5oOl1J67hhjy0Tp wUt2/Ir96FOPEfWyJtXs1ls5GZMRgm4NLphkT4dhP2NOrzFYpguUwTTyrU0JvyAc5p e/CtU5IXiibo9ZdPw3xVAyJIL4riB8DbdQSpUGYv14iqQsoYDgksj26a6yBV1mXD+5 44B3X9gmdl7xA== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.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 1oGHMT-00A3QI-Nn; Tue, 26 Jul 2022 11:00:21 +0100 Date: Tue, 26 Jul 2022 11:00:21 +0100 Message-ID: <87a68wxkga.wl-maz@kernel.org> From: Marc Zyngier To: Kalesh Singh Cc: mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com, tabba@google.com, oliver.upton@linux.dev, will@kernel.org, qperret@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, andreyknvl@gmail.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, android-mm@google.com, kernel-team@android.com Subject: Re: [PATCH v6 12/17] KVM: arm64: Add PROTECTED_NVHE_STACKTRACE Kconfig In-Reply-To: <20220726073750.3219117-13-kaleshsingh@google.com> References: <20220726073750.3219117-1-kaleshsingh@google.com> <20220726073750.3219117-13-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=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kaleshsingh@google.com, mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com, tabba@google.com, oliver.upton@linux.dev, will@kernel.org, qperret@google.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, andreyknvl@gmail.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, android-mm@google.com, 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 On Tue, 26 Jul 2022 08:37:45 +0100, Kalesh Singh wrote: >=20 > This can be used to disable stacktrace for the protected KVM > nVHE hypervisor, in order to save on the associated memory usage. >=20 > This option is disabled by default, since protected KVM is not widely > used on platforms other than Android currently. >=20 > Signed-off-by: Kalesh Singh > Reviewed-by: Fuad Tabba > Tested-by: Fuad Tabba > --- >=20 > Changes in v6: > - Add Fuad=E2=80=99s Reviewed-by and Tested-by tags >=20 > Changes in v5: > - Make PROTECTED_NVHE_STACKTRACE depend on NVHE_EL2_DEBUG, per Marc >=20 > arch/arm64/kvm/Kconfig | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig > index 8a5fbbf084df..09c995869916 100644 > --- a/arch/arm64/kvm/Kconfig > +++ b/arch/arm64/kvm/Kconfig > @@ -46,6 +46,21 @@ menuconfig KVM > =20 > If unsure, say N. > =20 > +config PROTECTED_NVHE_STACKTRACE > + bool "Protected KVM hypervisor stacktraces" > + depends on NVHE_EL2_DEBUG > + 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. > + > config NVHE_EL2_DEBUG > bool "Debug mode for non-VHE EL2 object" > depends on KVM Having NVHE_EL2_DEBUG after PROTECTED_NVHE_STACKTRACE is pretty odd when you use 'make menuconfig', as the new option appears out of sequence. I'll move it around, no need to respin for this. Thanks, M. --=20 Without deviation from the norm, progress is not possible.