From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76DF82E3397; Wed, 25 Feb 2026 18:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772042761; cv=none; b=o65WNUlhG6Tb7FxKGY0U9ulLdyGiWDThVu2TfjbboZLtvf/A5sRdTnOUfjI12Zd27dAv5qzmU/ldUqcHHut45MpU8TYcw21VXvIchRkpauImE3XCneWXd47fqw6wflXDtkD86Ho8zeHpENKW4uNzQPrHYM13BCncefeBTlmcous= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772042761; c=relaxed/simple; bh=YB6d0VUqMffIUrv91jAOHnTGBUBEMBtpj9+Ww1jhiJc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y3DKXVG6mTayoHCJd59lfU7mTuAQrmYMQR3DhAJjFDtWBd2CkuGXIU/5WK1jvULg9YVevSYV8IDD49vZ2xjn5xfNnS1S7cQfurRhUSdOW1tgfUS31zYxmzUKqa8JdxClP75BR+jGg+eqQpSfJpFXSbuw7Ie80Bts22zJd75UOA4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lV5K2XPX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lV5K2XPX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95425C116D0; Wed, 25 Feb 2026 18:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772042761; bh=YB6d0VUqMffIUrv91jAOHnTGBUBEMBtpj9+Ww1jhiJc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lV5K2XPXMHCr52eBxVhUjKUYmk825lbHp6fxibfqCvS5SE2fZ1V7NJZGialt9+fwi /Voqv5LNKkoXdV26NRujTM2PEXWcYS8aTig8epWkjnPdHXrT+KtJkeh/a48XSUcYk7 D3TBY8UPKvLH/taMKTEGWEJlPVOJQiaLl45nzIe4d4vD2i/1mx+CEQ3K1fQGfUQBH+ MCYRbxHpXBdSiI7/u6ZVthdCUumzFVDgck3MhVz6cVL2SwWr4cmUHrPA3Xj828MG3R DLJoqY0B4movPtbIGTqEyRMO8YFe8HJ3VCzKJ2CVxqvNUVZXi1DS7DtIaYNzLr9jVv Xo03vDAoozRTQ== Date: Wed, 25 Feb 2026 11:05:57 -0700 From: Tycho Andersen To: Sean Christopherson Cc: Ashish Kalra , Tom Lendacky , John Allen , Herbert Xu , Paolo Bonzini , Shuah Khan , "David S. Miller" , 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 Message-ID: References: <20260223162900.772669-1-tycho@kernel.org> <20260223162900.772669-4-tycho@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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)" > > > > > > > > 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