* [RFC] intel_rapl: exposing PL3 / PsysPL3 (MSR 0x615) through powercap?
@ 2026-11-17 10:27 Lars Schellhas van Kisfeld
2026-11-17 15:59 ` srinivas pandruvada
0 siblings, 1 reply; 2+ messages in thread
From: Lars Schellhas van Kisfeld @ 2026-11-17 10:27 UTC (permalink / raw)
To: linux-pm@vger.kernel.org
Cc: Rafael J. Wysocki, Srinivas Pandruvada, Zhang Rui
Hi,
before writing a patch I'd like to ask whether this would be welcome.
Background: I'm working on a user-space daemon that applies the Windows
power configuration of Microsoft Surface devices on Linux [1]. On Windows,
Intel DTT writes MSR 0x615 dynamically as a platform peak limit. On a
Surface Book 3 (Ice Lake) the firmware sets it to 65 W (enabled); Windows
raises it to 100 W on AC. powercap has no constraint for it, so the daemon
writes 0x615 through /dev/cpu//msr, which needs CAP_SYS_RAWIO, fails under
lockdown and triggers the "unrecognized MSR" warning.
What I measured: on the SB3, 0x615 binds on platform (psys) power, not on
package power. With 20 W in bits 14:0 and the enable bit as found, psys
power under all-core load drops from ~35 W to ~18 W. Restoring the original
value works. A tester saw the same write, bind and restore on an Alder Lake
Surface Pro 9. coreboot also treats 0x615 as PsysPL3, next to 0x65C.
Questions:
1. Is 0x615 PsysPL3 (platform domain) on all client parts that have it, and
is its layout documented publicly (time window, duty cycle in bits
30:24, lock bit 31)? I couldn't find 615H in the public SDM.
2. Would you accept a third constraint on the psys domain for it, opt-in
per CPU model like msr_pl4_support? Duty cycle would stay untouched.
3. Any preference for the constraint name? "peak_power" is taken by PL4.
If this sounds reasonable, I'd send a patch for the models I can verify,
and only those.
Thanks,
Lars
[1] https://github.com/larsschellhas/linux-surface-power
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] intel_rapl: exposing PL3 / PsysPL3 (MSR 0x615) through powercap?
2026-11-17 10:27 [RFC] intel_rapl: exposing PL3 / PsysPL3 (MSR 0x615) through powercap? Lars Schellhas van Kisfeld
@ 2026-11-17 15:59 ` srinivas pandruvada
0 siblings, 0 replies; 2+ messages in thread
From: srinivas pandruvada @ 2026-11-17 15:59 UTC (permalink / raw)
To: Lars Schellhas van Kisfeld, linux-pm@vger.kernel.org
Cc: Rafael J. Wysocki, Zhang Rui
Hi Lars,
On Tue, 2026-11-17 at 10:27 +0000, Lars Schellhas van Kisfeld wrote:
> Hi,
> before writing a patch I'd like to ask whether this would be welcome.
>
> Background: I'm working on a user-space daemon that applies the
> Windows
> power configuration of Microsoft Surface devices on Linux [1]. On
> Windows,
> Intel DTT writes MSR 0x615 dynamically as a platform peak limit. On a
> Surface Book 3 (Ice Lake) the firmware sets it to 65 W (enabled);
> Windows
> raises it to 100 W on AC. powercap has no constraint for it, so the
> daemon
> writes 0x615 through /dev/cpu//msr, which needs CAP_SYS_RAWIO, fails
> under
> lockdown and triggers the "unrecognized MSR" warning.
>
> What I measured: on the SB3, 0x615 binds on platform (psys) power,
> not on
> package power. With 20 W in bits 14:0 and the enable bit as found,
> psys
> power under all-core load drops from ~35 W to ~18 W. Restoring the
> original
> value works. A tester saw the same write, bind and restore on an
> Alder Lake
> Surface Pro 9. coreboot also treats 0x615 as PsysPL3, next to 0x65C.
>
> Questions:
> 1. Is 0x615 PsysPL3 (platform domain) on all client parts that have
> it, and
> is its layout documented publicly (time window, duty cycle in
> bits
> 30:24, lock bit 31)? I couldn't find 615H in the public SDM.
This is not documented in SDM. So, will be difficult to add to Linux
kernel. When not documented, it is difficult to what each fields mean
and can change gen to gen.
Thanks,
Srinivas
> 2. Would you accept a third constraint on the psys domain for it,
> opt-in
> per CPU model like msr_pl4_support? Duty cycle would stay
> untouched.
> 3. Any preference for the constraint name? "peak_power" is taken by
> PL4.
>
> If this sounds reasonable, I'd send a patch for the models I can
> verify,
> and only those.
> Thanks,
> Lars
>
> [1] https://github.com/larsschellhas/linux-surface-power
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-17 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 10:27 [RFC] intel_rapl: exposing PL3 / PsysPL3 (MSR 0x615) through powercap? Lars Schellhas van Kisfeld
2026-11-17 15:59 ` srinivas pandruvada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox