From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 878FE2EC0A2 for ; Mon, 27 Apr 2026 21:20:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777324813; cv=none; b=n8D5Po8axHAI4/JQuCntWCEFPWTog1AjWni89IAocvDyKq05oFxH6LnatblM82IS2UELbcN2Lgz4VEMDkxLk9tCjdswB6hr9ZUVgkzBQDLRWwNAfMK9mwQNMbX5j837yB9pfA2DqDcJ69MY2N2xIPfr2O7M/djTbhyZcsQRTEK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777324813; c=relaxed/simple; bh=wCXqIOOlIDnSn6wujP2KbKL2ztP/1h1QOB0MF5jkUzE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=rkyDe5RRKHS8V+AAleUB18qReBx868HHxTmEEz3U9DuYencFLlUTcxDB9JNs7husLKIPQDET7xKH60plKBpQWDU+qrZR0ULkhjx8mK7fr4ZBOe1s3j2OzXAQqYuN5G6Dmoroh0xjh0Sq99uxol67HiR9c35ucrvC5vKhvRliDME= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=S0ltqXpB; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="S0ltqXpB" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-82cf8dcd079so6947355b3a.1 for ; Mon, 27 Apr 2026 14:20:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777324812; x=1777929612; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=L/MdLtT/yrkXJOR0VhZtn2A+WvIE3I+Wl3TlhiqBWNg=; b=S0ltqXpB/1X5RzLmttfSNPuKUVDOgZNT/ZNx4LZJ5lrYLCRPb+WNJp8NKpDsV1rv1A p4F2WcT/qB3uVk19pUgJH5+/ZeBdnzHaBWy9F2oBn/ZZlxYlMAu+ooB5Mc00Sm2UCblT BpFXTbttLSQqKz/mCRc+T89+FhRa831hCglH77YDMSXfue+Cn1YlkFjqwJgpPe1Fyo5N Gerh0PE1Ie0PRe1XU16OXrI/ag3s2DP8VXBSukJFGOltSYKLS8AQ6+40eSGDeF7YQpI6 XhJIbWL+GJ5zY//Kp9sa8XHO0ars3PS7a5amowYGe6TnNEq4Ve94frChExt0DWsuX4tV OhPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777324812; x=1777929612; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=L/MdLtT/yrkXJOR0VhZtn2A+WvIE3I+Wl3TlhiqBWNg=; b=T6i233EysPWZcve4EyWYoop0gYjqCKQ2E1Q/VEL/lJqQNYNVPrbREV1A2NAANro3NE qz0Hqkl7Ck3jCJc1AgnGR15iWKAV9RZdZGGTmx0UtFnXF9jxTjEk8qqiXwVhI/yt3hUe WFjw+DKLpSIRwer0Qc6cA8mftv47Ah0FMMIHYvEDkP46GgcWs/zCoW1obLfkBKojIAdE ehS3sfu34AN9qG59cXt5j/pVIB+6fG84TH7BdTK/uQ+i2/k6G8KjXvpw2rcUQw+PuVbi fNED7QbuKdWNca3uRh7khQCuzlx79s0k4yUcmcBcQLZh8kBmfp17G8j5WmSszqyPcfKf ksMQ== X-Forwarded-Encrypted: i=1; AFNElJ+Bk+QL+1nhzQB+SutQOzZ68IpKTpbFnvUk7Wk8AWip6/8SQG4nAnenbwxQyGeUfSCwJ2Y=@vger.kernel.org X-Gm-Message-State: AOJu0YxU94EyxNt/l1Y97s5psD8p1Pm2ACwLbsPLwbVkH4I9qGeSbfok W0pZ05aaBIjmXafB9t+KLXWn9bmOXixgvS44jUH47shTIttkL8n1gQkV6zA+XPFXJ9PTfcUFqqj jKQmFPA== X-Received: from pfoo23.prod.google.com ([2002:a05:6a00:1a17:b0:82f:aad4:3985]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:408b:b0:82d:29f:d003 with SMTP id d2e1a72fcca58-834ddb0bbeamr173477b3a.12.1777324811618; Mon, 27 Apr 2026 14:20:11 -0700 (PDT) Date: Mon, 27 Apr 2026 14:20:10 -0700 In-Reply-To: <20260427204847.112899-4-tycho@kernel.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260427204847.112899-1-tycho@kernel.org> <20260427204847.112899-4-tycho@kernel.org> Message-ID: Subject: Re: [PATCH v2 3/4] KVM: SEV: Add the kvm-amd.rapl_disable module parameter From: Sean Christopherson To: Tycho Andersen Cc: Ashish Kalra , Tom Lendacky , John Allen , Herbert Xu , "David S. Miller" , Jonathan Corbet , Shuah Khan , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Shuah Khan , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Kim Phillips , Alexey Kardashevskiy , Nikunj A Dadhania , Andrew Morton , Randy Dunlap , Dapeng Mi , Kees Cook , Marco Elver , Jakub Kicinski , Li RongQing , Eric Biggers , "Paul E. McKenney" , linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Mon, Apr 27, 2026, Tycho Andersen wrote: > From: "Tycho Andersen (AMD)" > > 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) > --- > 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.