Re: [PATCH v2 3/4] KVM: SEV: Add the kvm-amd.rapl_disable module parameter

Sean Christopherson
2026-04-27T21:20:12Z

On Mon, Apr 27, 2026, Tycho Andersen wrote:
> From: "Tycho Andersen (AMD)" <tycho@kernel.org>
>
> Add a user-visible way to set the RAPL_DIS bit for SNP init.
>
> Since setting RAPL_DIS affects the whole system, put the module parameter
> in kvm_amd instead of in the CCP driver to hopefully make it more obvious
> to admins.
>
> Signed-off-by: Tycho Andersen (AMD) <tycho@kernel.org>
> ---
> Documentation/admin-guide/kernel-parameters.txt | 5 +++++
> arch/x86/kvm/svm/sev.c | 8 ++++++++
> 2 files changed, 13 insertions(+)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 4d0f545fb3ec..2b50eed8664c 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -3207,6 +3207,11 @@ Kernel parameters
> max_snp_asid == min_sev_asid-1, will effectively make
> SEV-ES unusable.
>
> + kvm-amd.rapl_disable= [KVM,AMD] Whether to disable RAPL
> + (Running Average Power Limit) when initializing the SNP
> + firmware. This disables the counters for the entire system until an
> + SNP shutdown command is issued.

I'm pretty sure I said this earlier: KVM absolutely should not be able to disable
RAPL for the entire system. That needs to be a power management thing. KVM then
needs to communicate (and enforce?) the policy to userspace.