All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tycho Andersen <tycho@kernel.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Ashish Kalra <ashish.kalra@amd.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	John Allen <john.allen@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 3/4] crypto/ccp: support setting RAPL_DIS in SNP_INIT_EX
Date: Wed, 25 Feb 2026 11:05:57 -0700	[thread overview]
Message-ID: <aZ86BZWi-GLiHvmt@tycho.pizza> (raw)
In-Reply-To: <aZ3k01UObX03Sv-n@google.com>

On Tue, Feb 24, 2026 at 09:50:11AM -0800, Sean Christopherson wrote:
> On Mon, Feb 23, 2026, Tycho Andersen wrote:
> > On Mon, Feb 23, 2026 at 08:40:19AM -0800, Sean Christopherson wrote:
> > > On Mon, Feb 23, 2026, Tycho Andersen wrote:
> > > > From: "Tycho Andersen (AMD)" <tycho@kernel.org>
> > > > 
> > > > The kernel allows setting the RAPL_DIS policy bit, but had no way to set
> > > 
> > > Please actually say what RAPL_DIS is and does, and explain why this is the
> > > correct approach.  I genuinely have no idea what the impact of this patch is,
> > > (beyond disabling something, obviously).
> > 
> > Sure, the easiest thing is probably to quote the firmware PDF:
> > 
> >     Some processors support the Running Average Power Limit (RAPL)
> >     feature which provides information about power utilization of
> >     software. RAPL can be disabled using the RAPL_DIS flag in
> >     SNP_INIT_EX to disable RAPL while SNP firmware is in the INIT
> >     state. Guests may require that RAPL is disabled by using the
> >     POLICY.RAPL_DIS guest policy flag.
> 
> Ah, I assume this about disabling RAPL to mitigate a potential side channel?  If
> so, please call that out in the changelog.
> 
> And does this disable RAPL for _everything_?  Or does it just disable RAPL for
> SNP VMs?  If it's the former, then burying this in drivers/crypto/ccp/sev-dev.c
> feels wrong.

Presumably you're right on both counts, but I've asked our firmware
team to clarify exactly what happens.

I guess that means it should be kvm-amd.rapl_disable?

Thanks,

Tycho

  reply	other threads:[~2026-02-25 18:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 16:28 [PATCH 0/4] Allow setting RAPL_DIS during SNP_INIT_EX Tycho Andersen
2026-02-23 16:28 ` [PATCH 1/4] selftests/kvm: allow retrieving underlying SEV firmware error Tycho Andersen
2026-02-23 16:28 ` [PATCH 2/4] selftests/kvm: check that SEV-ES VMs are allowed in SEV-SNP mode Tycho Andersen
2026-02-23 16:36   ` Sean Christopherson
2026-02-23 16:48     ` Tycho Andersen
2026-02-23 17:15       ` Sean Christopherson
2026-02-23 22:12         ` Tycho Andersen
2026-02-24 18:02           ` Sean Christopherson
2026-02-25 17:29             ` Tycho Andersen
2026-02-25 17:44               ` Sean Christopherson
2026-02-26 20:59                 ` Tycho Andersen
2026-02-26 22:28                   ` Sean Christopherson
2026-02-23 16:28 ` [PATCH 3/4] crypto/ccp: support setting RAPL_DIS in SNP_INIT_EX Tycho Andersen
2026-02-23 16:40   ` Sean Christopherson
2026-02-23 22:14     ` Tycho Andersen
2026-02-24 17:50       ` Sean Christopherson
2026-02-25 18:05         ` Tycho Andersen [this message]
2026-02-23 16:29 ` [PATCH 4/4] selftests/kvm: smoke test support for RAPL_DIS Tycho Andersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aZ86BZWi-GLiHvmt@tycho.pizza \
    --to=tycho@kernel.org \
    --cc=ashish.kalra@amd.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=john.allen@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=shuah@kernel.org \
    --cc=thomas.lendacky@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.