[PATCH v5 08/17] KVM: arm64: Add PROTECTED_NVHE_STACKTRACE Kconfig

Fuad Tabba tabba at google.com
Thu Jul 21 02:57:44 PDT 2022


Hi Kalesh,

On Thu, Jul 21, 2022 at 6:57 AM Kalesh Singh <kaleshsingh at google.com> 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 <kaleshsingh at google.com>
> ---

Just wanted to point out that I have specifically tested this as well,
enabling PROTECTED_NVHE_STACKTRACE but not NVHE_EL2_DEBUG. Works as
expected.

Tested-by: Fuad Tabba <tabba at google.com>
Reviewed-by: Fuad Tabba <tabba at google.com>

Cheers,
/fuad


>
> Changes in v5:
>   - Make PROTECTED_NVHE_STACKTRACE depend on NVHE_EL2_DEBUG, per Marc
>
>  arch/arm64/kvm/Kconfig | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> 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
>
>           If unsure, say N.
>
> +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
> --
> 2.37.0.170.g444d1eabd0-goog
>



More information about the linux-arm-kernel mailing list