From patchwork Fri Jul 15 06:10:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalesh Singh X-Patchwork-Id: 12918770 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 38177C43334 for ; Fri, 15 Jul 2022 06:14:13 +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:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=9HJNxorenQEbIm2+jUwDvxYx6+2Nc7XCwC0VQWMBs8c=; b=TPYe/4QfXii+KHDChuZoLeB9AB ZYVzbKsNc9CikFuHOIVKdDu62JjC0CUmLmRu3wnTYjF/6rn4r+/bL7unxPuiwQ1SJgqO51kfq3bYJ 2M4yRgFPTQkGsdsc2wOB0RrEq6ntrS5P16wrU8OWWBlQc3tBlylvj+rOSg5CSMvb+TsE9CglkTPmp UeH1C9yMLftDksO0qUJboy8LINrloVAdR/dcYmHkl6pNhVyjqRXAXCRyoNm/6R0aVu6xwXA9TzoqC caR2LUh3sECy8kCLRRP3dUX1gFQAHeWormu9QzReRAEx5Tt7xvnPR0RiTNzTg50s6gOjT6+7xPMZn nyqY+YBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCEZS-004X6u-UO; Fri, 15 Jul 2022 06:13:03 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCEXu-004WNb-4Y for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 06:11:30 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-31cd7ade3d6so33639107b3.3 for ; Thu, 14 Jul 2022 23:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=3a/b4pln92HS2a1AnnvuOdac8xZP1xDPa4SrMkGLjR0=; b=q4C1JK+RQNNz76sRdeaP39mUzrBswZ6WynqoMQ6MKDm8YuAxyRhzVsfEvCXanehao4 k08Pi42tfwzVKaJ/csOoB8UeWhtI7W1QCy9bY+R8OOq/Tmlbkj6AM8hN1G8VVfDH9g6J PjQhLyB7sX4Nw2ShhZyWeWNS6Ke+I9KTVSozUpiBpss5tuOGiAPO+ZobMPwBDxLrFxE7 zigNiQz1lT/DdliNuWo2n7LVM1Hm0B6jAbBGylJ1zabLyv9YuXpFLMj1nc5SWdqRFE0C kUmZ3mPGCWamcUSLxEpDiVl7ylw4U2x4CdiGJoYyQ38S/H18B/rPV+u0xLmXPa5tDHtV ZGLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=3a/b4pln92HS2a1AnnvuOdac8xZP1xDPa4SrMkGLjR0=; b=0ekaZ8pDpoY/JFbHl1QeOulh5ZwZQJAI0A/VuF8jAXj/lB46aDJoEd0dEDLqkugHsK +ElGWHLSkKeoiLTC1tjTUZIh1jVh50vWQeatsf+K8n9cupudO47b+TPZywCjtPwu7lkz YLafP93U2H4iwG6NCnHZ7QOzLuLIyAGMRZcp1XDQj7q5V8cbqRCxaqwjCANmfTvv8eeA FkY6yHZxNttfjWIL7cBY6PiFEruYycL5XCbA6XwHpulngBexZQWglhBhzxOSMRjJnvY5 gmNp0+Ty36gt37xJ5+yH7MlrqpKIR2ZKUEDoQ9Nih2R0EOPyNnOucNstWE8HbNJ4R3Dh C2sQ== X-Gm-Message-State: AJIora89zcgQwiCIf4XRqCvThQEMUbw6Xp/ephiD7yRX3Vw35ilKIQ3W 94BQHu9qomhEevEEWM/+iSNUQ5dUrrcartmMTA== X-Google-Smtp-Source: AGRyM1sPOtLVKeDmWy879CSPJRglmjW5aqZxQkCzJXmhwSfCnvkLDVoRYFusSgov/9niuUM5cImhZ1ZTKOCqCOKMnQ== X-Received: from kaleshsingh.mtv.corp.google.com ([2620:15c:211:200:f010:455b:62ce:19e]) (user=kaleshsingh job=sendgmr) by 2002:a81:17ca:0:b0:31c:9a75:1f2b with SMTP id 193-20020a8117ca000000b0031c9a751f2bmr14665610ywx.83.1657865484575; Thu, 14 Jul 2022 23:11:24 -0700 (PDT) Date: Thu, 14 Jul 2022 23:10:17 -0700 In-Reply-To: <20220715061027.1612149-1-kaleshsingh@google.com> Message-Id: <20220715061027.1612149-9-kaleshsingh@google.com> Mime-Version: 1.0 References: <20220715061027.1612149-1-kaleshsingh@google.com> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog Subject: [PATCH v4 08/18] KVM: arm64: Add PROTECTED_NVHE_STACKTRACE Kconfig From: Kalesh Singh To: maz@kernel.org, mark.rutland@arm.com, broonie@kernel.org, madvenka@linux.microsoft.com Cc: will@kernel.org, qperret@google.com, tabba@google.com, kaleshsingh@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, drjones@redhat.com, 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220714_231126_243270_93968D9F X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. + config NVHE_EL2_DEBUG bool "Debug mode for non-VHE EL2 object" depends on KVM