amd-cppc CPU Performance Scaling Driver
v10 cover amd-cppc CPU Performance Scaling Driver
amd-cppc is the AMD CPU performance scaling driver that introduces a new CPU frequency control mechanism on modern AMD APU and CPU series in Xen. The new mechanism is based on Collaborative Processor Performance Control (CPPC) which provides finer grain frequency management than legacy ACPI hardware P-States. Current AMD CPU/APU platforms are using the ACPI P-states driver to manage CPU frequency and clocks with switching only in 3 P-states. CPPC replaces the ACPI P-states controls and allows a flexible, low-latency interface for Xen to directly communicate the performance hints to hardware.
amd_cppc driver has 2 operation modes: autonomous (active) mode, and non-autonomous (passive) mode. We register different CPUFreq driver for different modes, "amd-cppc" for passive mode and "amd-cppc-epp" for active mode.
The passive mode leverages common governors such as *ondemand*, *performance*, etc, to manage the performance tuning. While the active mode uses epp to provides a hint to the hardware if software wants to bias toward performance (0x0) or energy efficiency (0xff). CPPC power algorithm in hardware will automatically calculate the runtime workload and adjust the realtime cpu cores frequency according to the power supply and thermal, core voltage and some other hardware conditions.
amd-cppc is enabled on passive mode with a top-level cpufreq=amd-cppc option, while users add extra active flag to select active mode.
With cpufreq=amd-cppc,active, we did a 60s sampling test to see the CPU frequency change, through tweaking the energy_perf preference from xenpm set-cpufreq-cppc powersave to xenpm set-cpufreq-cppc performance. The outputs are as follows:
``` Setting CPU in powersave mode Sampling and Outputs: Avg freq 580000 KHz Avg freq 580000 KHz Avg freq 580000 KHz Setting CPU in performance mode Sampling and Outputs: Avg freq 4640000 KHz Avg freq 4220000 KHz Avg freq 4640000 KHz ```
Penny Zheng (8):
xen/cpufreq: make HW_ALL the only expected value for CPPC mode xen/cpufreq: implement amd-cppc driver for CPPC in passive mode xen/cpufreq: implement amd-cppc-epp driver for CPPC in active mode xen/cpufreq: get performance policy from governor set via xenpm tools/cpufreq: extract CPPC para from cpufreq para xen/cpufreq: bypass governor-related para for amd-cppc-epp xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc
driver
CHANGELOG.md: add amd-cppc/amd-cppc-epp cpufreq driver support
CHANGELOG.md | 1 + docs/misc/xen-command-line.pandoc | 9 +- tools/include/xenctrl.h | 27 +- tools/libs/ctrl/xc_pm.c | 47 +- tools/misc/xenpm.c | 118 +++-- xen/arch/x86/acpi/cpufreq/amd-cppc.c | 709 ++++++++++++++++++++++++++- xen/arch/x86/cpu/amd.c | 8 +- xen/arch/x86/include/asm/amd.h | 2 + xen/arch/x86/include/asm/msr-index.h | 6 + xen/drivers/acpi/pm-op.c | 78 ++- xen/drivers/cpufreq/cpufreq.c | 10 + xen/drivers/cpufreq/utility.c | 15 + xen/include/acpi/cpufreq/cpufreq.h | 34 ++ xen/include/public/sysctl.h | 33 +- 14 files changed, 985 insertions(+), 112 deletions(-)
Signature · 1 line
2.34.1
PATCH v10 1/8 xen/cpufreq: make HW_ALL the only expected value for CPPC mode
Right now, no matter for code construction or hardware restriction, HW_ALL shall be the only expected values in _PSD for AMD CPPC mode
---
v9 - v10:
- new commit
--- xen/drivers/cpufreq/cpufreq.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
xen/drivers/cpufreq/cpufreq.c +10 -0
@@ -765,6 +765,16 @@ int set_cppc_pminfo(unsigned int acpi_id, goto out; } +/* Right now, HW_ALL shall be the only expected value in CPPC mode */ +if ( cppc_data->shared_type !=CPUFREQ_SHARED_TYPE_HW ) + { + ret = -EINVAL ; +printk_once (XENLOG_ERR +"Unsupported sharing type %u in CPPC mode\n" , + cppc_data->shared_type); + goto out; + } +if ( cppc_data->flags &XEN_CPPC_CPC ) { if ( cppc_data->cpc.highest_perf == 0 ||
Signature · 1 line
2.34.1
Re: [PATCH v10 1/8] xen/cpufreq: make HW_ALL the only expected value for CPPC mode
Quoted 5 lines · Penny Zheng
Right now, no matter for code construction or hardware restriction,
HW_ALLshall be the only expected values in_PSDfor AMD CPPC modeSuggested-by Jan Beulich <[email protected]>Signed-off-by Penny Zheng <[email protected]>
PATCH v10 2/8 xen/cpufreq: implement amd-cppc driver for CPPC in passive mode
In reply to Penny Zhengamd-cppc is the AMD CPU performance scaling driver that introduces a new CPU frequency control mechanism. The new mechanism is based on Collaborative Processor Performance Control (CPPC) which is a finer grain frequency management than legacy ACPI hardware P-States.
Current AMD CPU platforms are using the ACPI P-states driver to manage CPU frequency and clocks with switching only in 3 P-states, while the new amd-cppc allows a more flexible, low-latency interface for Xen to directly communicate the performance hints to hardware.
"amd-cppc" driver is responsible for implementing CPPC in passive mode, which still leverages Xen governors such as *ondemand*, *performance*, etc, to calculate the performance hints. In the future, we will introduce an advanced active mode to enable autonomous performence level selection.
Field epp, energy performance preference, which only has meaning when active mode is enabled and will be introduced later in details, so we read pre-defined BIOS value for it in passive mode.
---
v1 -> v2:
- re-construct union caps and req to have anonymous struct instead
- avoid "else" when the earlier if() ends in an unconditional control flow statement
- Add check to avoid chopping off set bits from cast
- make pointers pointer-to-const wherever possible
- remove noisy log
- exclude families before 0x17 before CPPC-feature MSR op
- remove useless variable helpers
- use xvzalloc and XVFREE
- refactor error handling as ENABLE bit can only be cleared by reset
---
v2 -> v3:
- Move all MSR-definations to msr-index.h and follow the required style
- Refactor opening figure braces for struct/union
- Sort overlong lines throughout the series
- Make offset/res int covering underflow scenario
- Error out when amd_max_freq_mhz isn't set
- Introduce amd_get_freq(name) macro to decrease redundancy
- Supported CPU family checked ahead of smp-function
- Nominal freq shall be checked between the [min, max]
- Use APERF/MPREF to calculate current frequency
- Use amd_cppc_cpufreq_cpu_exit() to tidy error path
---
v3 -> v4:
- verbose print shall come with a CPU number
- deal with res <= 0 in amd_cppc_khz_to_perf()
- introduce a single helper amd_get_lowest_or_nominal_freq() to cover both lowest and nominal scenario
- reduce abuse of wrmsr_safe()/rdmsr_safe() with wrmsrl()/rdmsrl()
- move cf_check from amd_cppc_write_request() to amd_cppc_write_request_msrs()
- add comment to explain why setting non_linear_lowest in passive mode
- add check to ensure perf values in
lowest <= non_linear_lowest <= nominal <= highset
- refactor comment for "data->err != 0" scenario
- use "data->err" instead of -ENODEV
- add U suffixes for all msr macro
---
v4 -> v5:
- all freq-values shall be unsigned int type
- remove shortcuts as it is rarely taken
- checking cpc.nominal_mhz and cpc.lowest_mhz are non-zero values is enough
- drop the explicit type cast
- null pointer check is in no need for internal functions
- change amd_get_lowest_or_nominal_freq() to amd_get_cpc_freq()
- clarifying function-wide that the calculated frequency result is to be in kHz
- use array notation
- with cpu_has_cppc check, no need to do cpu family check
---
v5 -> v6
- replace "AMD_CPPC" with "AMD-CPPC" in message
- add equation(mul,div) non-zero check
- replace -EINVAL with -EOPNOTSUPP
- refactor comment
---
v6 -> v7
- used > in place of !=, to not only serve a doc aspect, but also allow to drop one part
- unify with UINT8_MAX
- return -ERANGE as we reject perf values of 0 as invalid
- replace uint32_t with unsigned int
- Move some epp introduction here, otherwise we will mis-handle this field here by always clearing it
---
v7 -> v8:
- refine message text by removing 0
---
v8 -> v9
- embed struct amd_cppc_drv_data{} into struct cpufreq_policy{}
---
v9 - v10
- rewind the changes in v9
--- xen/arch/x86/acpi/cpufreq/amd-cppc.c | 418 ++++++++++++++++++++++++++- xen/arch/x86/cpu/amd.c | 8 +- xen/arch/x86/include/asm/amd.h | 2 + xen/arch/x86/include/asm/msr-index.h | 6 + xen/include/public/sysctl.h | 1 + 5 files changed, 430 insertions(+), 5 deletions(-)
xen/arch/x86/acpi/cpufreq/amd-cppc.c +417 -1
@@ -14,7 +14,98 @@#include <xen/domain.h> #include <xen/init.h> #include <xen/param.h> +#include <xen/percpu.h> +#include <xen/xvmalloc.h> #include <acpi/cpufreq/cpufreq.h> +#include <asm/amd.h> +#include <asm/msr.h> + +#define amd_cppc_err(cpu, fmt, args...) \ + printk(XENLOG_ERR "AMD-CPPC: CPU%u error: " fmt, cpu, ## args) +#define amd_cppc_warn(cpu, fmt, args...) \ + printk(XENLOG_WARNING "AMD-CPPC: CPU%u warning: " fmt, cpu, ## args) +#define amd_cppc_verbose(cpu, fmt, args...) \ +({ \ + if ( cpufreq_verbose ) \ + printk(XENLOG_DEBUG "AMD-CPPC: CPU%u " fmt, cpu, ## args); \ +}) + +/* +* Field highest_perf, nominal_perf, lowest_nonlinear_perf, and lowest_perf +* contain the values read from CPPC capability MSR. They represent the limits +* of managed performance range as well as the dynamic capability, which may +* change during processor operation +* Field highest_perf represents highest performance, which is the absolute +* maximum performance an individual processor may reach, assuming ideal +* conditions. This performance level may not be sustainable for long +* durations and may only be achievable if other platform components +* are in a specific state; for example, it may require other processors be +* in an idle state. This would be equivalent to the highest frequencies +* supported by the processor. +* Field nominal_perf represents maximum sustained performance level of the +* processor, assuming ideal operating conditions. All cores/processors are +* expected to be able to sustain their nominal performance state +* simultaneously. +* Field lowest_nonlinear_perf represents Lowest Nonlinear Performance, which +* is the lowest performance level at which nonlinear power savings are +* achieved. Above this threshold, lower performance levels should be +* generally more energy efficient than higher performance levels. So in +* traditional terms, this represents the P-state range of performance levels. +* Field lowest_perf represents the absolute lowest performance level of the +* platform. Selecting it may cause an efficiency penalty but should reduce +* the instantaneous power consumption of the processor. So in traditional +* terms, this represents the T-state range of performance levels. +* +* Field max_perf, min_perf, des_perf store the values for CPPC request MSR. +* Software passes performance goals through these fields. +* Field max_perf conveys the maximum performance level at which the platform +* may run. And it may be set to any performance value in the range +* [lowest_perf, highest_perf], inclusive. +* Field min_perf conveys the minimum performance level at which the platform +* may run. And it may be set to any performance value in the range +* [lowest_perf, highest_perf], inclusive but must be less than or equal to +* max_perf. +* Field des_perf conveys performance level Xen governor is requesting. And it +* may be set to any performance value in the range [min_perf, max_perf], +* inclusive. +* Field epp represents energy performance preference, which only has meaning +* when active mode is enabled. +*/ +struct amd_cppc_drv_data +{ +const struct xen_processor_cppc *cppc_data; +union { +uint64_t raw; +struct { +unsigned int lowest_perf:8 ; +unsigned int lowest_nonlinear_perf:8 ; +unsigned int nominal_perf:8 ; +unsigned int highest_perf:8 ; + unsigned int :32; + }; + } caps; +union { +uint64_t raw; +struct { +unsigned int max_perf:8 ; +unsigned int min_perf:8 ; +unsigned int des_perf:8 ; +unsigned int epp:8 ; + unsigned int :32; + }; + } req; + +int err; +}; + +static DEFINE_PER_CPU_READ_MOSTLY(struct amd_cppc_drv_data *, + amd_cppc_drv_data); +/* +* Core max frequency read from PstateDef as anchor point +* for freq-to-perf transition +*/ +static DEFINE_PER_CPU_READ_MOSTLY(unsigned int, pxfreq_mhz); +static DEFINE_PER_CPU_READ_MOSTLY(uint8_t, epp_init);static bool __init amd_cppc_handle_option (const char *s,const char *end) {
@@ -50,10 +141,335 @@ int __init amd_cppc_cmdline_parse(const char *s, const char *e)return 0 ; } +/* +* If CPPC lowest_freq and nominal_freq registers are exposed then we can +* use them to convert perf to freq and vice versa. The conversion is +* extrapolated as an linear function passing by the 2 points: +* - (Low perf, Low freq) +* - (Nominal perf, Nominal freq) +* Parameter freq is always in kHz. +*/ +static int amd_cppc_khz_to_perf (const struct amd_cppc_drv_data *data, +unsigned int freq,uint8_t *perf) +{ +const struct xen_processor_cppc *cppc_data = data->cppc_data; +unsigned int mul, div; +int offset =0 , res; + +if ( cppc_data->cpc.lowest_mhz && + data->caps.nominal_perf > data->caps.lowest_perf && + cppc_data->cpc.nominal_mhz > cppc_data->cpc.lowest_mhz ) + { + mul = data->caps.nominal_perf - data->caps.lowest_perf; + div = cppc_data->cpc.nominal_mhz - cppc_data->cpc.lowest_mhz; + +/* +* We don't need to convert to kHz for computing offset and can +* directly use nominal_mhz and lowest_mhz as the division +* will remove the frequency unit. +*/ + offset = data->caps.nominal_perf - + (mul * cppc_data->cpc.nominal_mhz) / div; + } +else + { +/* Read Processor Max Speed(MHz) as anchor point */ + mul = data->caps.highest_perf; + div =this_cpu (pxfreq_mhz); +if ( !div ) +return -EOPNOTSUPP ; + } + + res = offset + (mul * freq) / (div *1000 ); +if ( res >UINT8_MAX ) + { +printk_once (XENLOG_WARNING +"Perf value exceeds maximum value 255: %d\n" , res); + *perf =UINT8_MAX ; +return 0 ; + } +if ( res <=0 ) + { +printk_once (XENLOG_WARNING +"Perf value smaller than minimum value: %d\n" , res); +return -ERANGE ; + } + *perf = res; + +return 0 ; +} + +/* +* _CPC may define nominal frequecy and lowest frequency, if not, use +* Processor Max Speed as anchor point to calculate. +* Output freq stores cpc frequency in kHz +*/ +static int amd_get_cpc_freq (const struct amd_cppc_drv_data *data, +unsigned int cpc_mhz,uint8_t perf, +unsigned int *freq) +{ +unsigned int mul, div, res; + +if ( cpc_mhz ) + { +/* Switch to kHz */ + *freq = cpc_mhz *1000 ; +return 0 ; + } + +/* Read Processor Max Speed(MHz) as anchor point */ + mul =this_cpu (pxfreq_mhz); +if ( !mul ) +return -EOPNOTSUPP ; + div = data->caps.highest_perf; + res = (mul * perf *1000 ) / div; +if (unlikely (!res) ) +return -EOPNOTSUPP ; + +return 0 ; +} + +/* Output max_freq stores calculated maximum frequency in kHz */ +static int amd_get_max_freq (const struct amd_cppc_drv_data *data, +unsigned int *max_freq) +{ +unsigned int nom_freq =0 ; +int res; + + res =amd_get_cpc_freq (data, data->cppc_data->cpc.nominal_mhz, + data->caps.nominal_perf, &nom_freq); +if ( res ) +return res; + + *max_freq = (data->caps.highest_perf * nom_freq) / data->caps.nominal_perf; + +return 0 ; +} + +static int cf_check amd_cppc_cpufreq_verify(struct cpufreq_policy *policy) +{ +cpufreq_verify_within_limits (policy, policy->cpuinfo.min_freq, + policy->cpuinfo.max_freq); + +return 0 ; +} + +static void cf_check amd_cppc_write_request_msrs(void *info) +{ +const struct amd_cppc_drv_data *data = info; + +wrmsrl (MSR_AMD_CPPC_REQ , data->req.raw); +} + +static void amd_cppc_write_request (unsigned int cpu,uint8_t min_perf, +uint8_t des_perf,uint8_t max_perf, +uint8_t epp) +{ +struct amd_cppc_drv_data *data =per_cpu (amd_cppc_drv_data, cpu); +uint64_t prev = data->req.raw; + + data->req.min_perf = min_perf; + data->req.max_perf = max_perf; + data->req.des_perf = des_perf; + data->req.epp = epp; + +if ( prev == data->req.raw ) +return ; + +on_selected_cpus (cpumask_of (cpu), amd_cppc_write_request_msrs, data,1 ); +} + +static int cf_check amd_cppc_cpufreq_target(struct cpufreq_policy *policy, +unsigned int target_freq, +unsigned int relation) +{ +unsigned int cpu = policy->cpu; +const struct amd_cppc_drv_data *data =per_cpu (amd_cppc_drv_data, cpu); +uint8_t des_perf; +int res; + +if (unlikely (!target_freq) ) +return 0 ; + + res =amd_cppc_khz_to_perf (data, target_freq, &des_perf); +if ( res ) +return res; + +/* +* Having a performance level lower than the lowest nonlinear +* performance level, such as, lowest_perf <= perf <= lowest_nonliner_perf, +* may actually cause an efficiency penalty, So when deciding the min_perf +* value, we prefer lowest nonlinear performance over lowest performance. +*/ +amd_cppc_write_request (policy->cpu, data->caps.lowest_nonlinear_perf, + des_perf, data->caps.highest_perf, +/* Pre-defined BIOS value for passive mode */ +per_cpu (epp_init, policy->cpu)); +return 0 ; +} + +static void cf_check amd_cppc_init_msrs(void *info) +{ +struct cpufreq_policy *policy = info; +struct amd_cppc_drv_data *data =this_cpu (amd_cppc_drv_data); +uint64_t val; +unsigned int min_freq =0 , nominal_freq =0 , max_freq; + +/* Package level MSR */ +rdmsrl (MSR_AMD_CPPC_ENABLE , val); +/* +* Only when Enable bit is on, the hardware will calculate the processor’s +* performance capabilities and initialize the performance level fields in +* the CPPC capability registers. +*/ +if ( !(val &AMD_CPPC_ENABLE ) ) + { + val |=AMD_CPPC_ENABLE ; +wrmsrl (MSR_AMD_CPPC_ENABLE , val); + } + +rdmsrl (MSR_AMD_CPPC_CAP1 , data->caps.raw); + +if ( data->caps.highest_perf ==0 || data->caps.lowest_perf ==0 || + data->caps.nominal_perf ==0 || data->caps.lowest_nonlinear_perf ==0 || + data->caps.lowest_perf > data->caps.lowest_nonlinear_perf || + data->caps.lowest_nonlinear_perf > data->caps.nominal_perf || + data->caps.nominal_perf > data->caps.highest_perf ) + { +amd_cppc_err (policy->cpu, +"Out of range values: highest(%u), lowest(%u), nominal(%u), lowest_nonlinear(%u)\n" , + data->caps.highest_perf, data->caps.lowest_perf, + data->caps.nominal_perf, data->caps.lowest_nonlinear_perf); + goto err; + } + +amd_process_freq (&cpu_data[policy->cpu], +NULL ,NULL , &this_cpu (pxfreq_mhz)); + + data->err =amd_get_cpc_freq (data, data->cppc_data->cpc.lowest_mhz, + data->caps.lowest_perf, &min_freq); +if ( data->err ) +return ; + + data->err =amd_get_cpc_freq (data, data->cppc_data->cpc.nominal_mhz, + data->caps.nominal_perf, &nominal_freq); +if ( data->err ) +return ; + + data->err =amd_get_max_freq (data, &max_freq); +if ( data->err ) +return ; + +if ( min_freq > nominal_freq || nominal_freq > max_freq ) + { +amd_cppc_err (policy->cpu, +"min(%u), or max(%u), or nominal(%u) freq value is incorrect\n" , + min_freq, max_freq, nominal_freq); + goto err; + } + + policy->min = min_freq; + policy->max = max_freq; + + policy->cpuinfo.min_freq = min_freq; + policy->cpuinfo.max_freq = max_freq; + policy->cpuinfo.perf_freq = nominal_freq; +/* +* Set after policy->cpuinfo.perf_freq, as we are taking +* APERF/MPERF average frequency as current frequency. +*/ + policy->cur =cpufreq_driver_getavg (policy->cpu,GOV_GETAVG ); + +/* Store pre-defined BIOS value for passive mode */ +rdmsrl (MSR_AMD_CPPC_REQ , val); +this_cpu (epp_init) =MASK_EXTR (val,AMD_CPPC_EPP_MASK ); + +return ; + + err: +/* +* No fallback shceme is available here, see more explanation at call +* site in amd_cppc_cpufreq_cpu_init(). +*/ + data->err = -EINVAL ; +} + +/* +* AMD CPPC driver is different than legacy ACPI hardware P-State, +* which has a finer grain frequency range between the highest and lowest +* frequency. And boost frequency is actually the frequency which is mapped on +* highest performance ratio. The legacy P0 frequency is actually mapped on +* nominal performance ratio. +*/ +static void amd_cppc_boost_init (struct cpufreq_policy *policy, +const struct amd_cppc_drv_data *data) +{ +if ( data->caps.highest_perf <= data->caps.nominal_perf ) +return ; + + policy->turbo =CPUFREQ_TURBO_ENABLED ; +} + +static int cf_check amd_cppc_cpufreq_cpu_exit(struct cpufreq_policy *policy) +{ +XVFREE (per_cpu (amd_cppc_drv_data, policy->cpu)); + +return 0 ; +} + +static int cf_check amd_cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) +{ +unsigned int cpu = policy->cpu; +struct amd_cppc_drv_data *data; + + data = xvzalloc(struct amd_cppc_drv_data); +if ( !data ) +return -ENOMEM ; + + data->cppc_data = &processor_pminfo[cpu]->cppc_data; + +per_cpu (amd_cppc_drv_data, cpu) = data; + +on_selected_cpus (cpumask_of (cpu), amd_cppc_init_msrs, policy,1 ); + +/* +* The enable bit is sticky, as we need to enable it at the very first +* begining, before CPPC capability values sanity check. +* If error path is taken effective, not only amd-cppc cpufreq core fails +* to initialize, but also we could not fall back to legacy P-states +* driver, irrespective of the command line specifying a fallback option. +*/ +if ( data->err ) + { +amd_cppc_err (cpu,"Could not initialize cpufreq core in CPPC mode\n" ); +amd_cppc_cpufreq_cpu_exit (policy); +return data->err; + } + + policy->governor = cpufreq_opt_governor ? :CPUFREQ_DEFAULT_GOVERNOR ; + +amd_cppc_boost_init (policy, data); + +amd_cppc_verbose (policy->cpu, +"CPU initialized with amd-cppc passive mode\n" ); + +return 0 ; +} + +static const struct cpufreq_driver __initconst_cf_clobber +amd_cppc_cpufreq_driver = +{ + .name =XEN_AMD_CPPC_DRIVER_NAME , + .verify = amd_cppc_cpufreq_verify, + .target = amd_cppc_cpufreq_target, + .init = amd_cppc_cpufreq_cpu_init, + .exit = amd_cppc_cpufreq_cpu_exit, +}; +int __init amd_cppc_register_driver (void ) {if ( !cpu_has_cppc )return -ENODEV ; -return -EOPNOTSUPP ; +return cpufreq_register_driver (&amd_cppc_cpufreq_driver); }
xen/arch/x86/cpu/amd.c +4 -4
@@ -613,10 +613,10 @@ static unsigned int attr_const amd_parse_freq(unsigned int family,return freq; } -static void amd_process_freq (const struct cpuinfo_x86 *c, -unsigned int *low_mhz, -unsigned int *nom_mhz, -unsigned int *hi_mhz) +void amd_process_freq (const struct cpuinfo_x86 *c, +unsigned int *low_mhz, +unsigned int *nom_mhz, +unsigned int *hi_mhz) {unsigned int idx =0 , h;uint64_t hi, lo, val;
xen/arch/x86/include/asm/amd.h +2 -0
@@ -173,5 +173,7 @@ extern bool amd_virt_spec_ctrl;bool amd_setup_legacy_ssbd (void );void amd_set_legacy_ssbd (bool enable);void amd_set_cpuid_user_dis (bool enable); +void amd_process_freq (const struct cpuinfo_x86 *c,unsigned int *low_mhz, +unsigned int *nom_mhz,unsigned int *hi_mhz);#endif /* __AMD_H__ */
xen/arch/x86/include/asm/msr-index.h +6 -0
@@ -252,6 +252,12 @@#define MSR_AMD_CSTATE_CFG 0xc0010296U +#define MSR_AMD_CPPC_CAP1 0xc00102b0U +#define MSR_AMD_CPPC_ENABLE 0xc00102b1U +#define AMD_CPPC_ENABLE (_AC(1, ULL) << 0) +#define MSR_AMD_CPPC_REQ 0xc00102b3U +#define AMD_CPPC_EPP_MASK (_AC(0xff, ULL) << 24) +/* * Legacy MSR constants in need of cleanup. No new MSRs below this comment. */
xen/include/public/sysctl.h +1 -0
@@ -453,6 +453,7 @@ struct xen_set_cppc_para {uint32_t activity_window; }; +#define XEN_AMD_CPPC_DRIVER_NAME "amd-cppc"#define XEN_HWP_DRIVER_NAME "hwp"/*
Signature · 1 line
2.34.1
PATCH v10 3/8 xen/cpufreq: implement amd-cppc-epp driver for CPPC in active mode
In reply to Penny Zhengamd-cppc has 2 operation modes: autonomous (active) mode and non-autonomous (passive) mode.
In active mode, we don't need Xen governor to calculate and tune the cpu frequency, while hardware built-in CPPC power algorithm will calculate the runtime workload and adjust cores frequency automatically according to the power supply, thermal, core voltage and some other hardware conditions. In active mode, CPPC ignores requests done in the desired performance field, and takes into account only the values set to the minimum performance, maximum performance, and energy performance preference registers.
A new field EPP (energy performance preference), in CPPC request register, is introduced. It will be used in the CCLK DPM controller to drive the frequency that a core is going to operate during short periods of activity, called minimum active frequency, It could contatin a range of values from 0 to 0xff. An EPP of zero sets the min active frequency to maximum frequency, while an EPP of 0xff sets the min active frequency to approxiately Idle frequency.
We implement a new AMD CPU frequency driver amd-cppc-epp for active mode. It requires active tag in Xen cmdline for users to explicitly select active mode.
In driver active-cppc-epp, ->setpolicy() is hooked, not the ->target(), as it does not depend on xen governor to do performance tuning.
We also introduce a new field "policy" (CPUFREQ_POLICY_xxx) to represent performance policy. Right now, it supports three values:CPUFREQ_POLICY_PERFORMANCE as maximum performance, CPUFREQ_POLICY_POWERSAVE as the least power consumption, and CPUFREQ_POLICY_ONDEMAND as no preference, just corresponding to "performance", "powersave" and "ondemand" Xen governor, which benefit users from re-using "governor" in Xen cmdline to deliver which performance policy they want to apply.
---
v1 -> v2:
- Remove redundant epp_mode
- Remove pointless initializer
- Define sole caller read_epp_init_once and epp_init value to read pre-defined BIOS epp value only once
- Combine the commit "xen/cpufreq: introduce policy type when cpufreq_driver->setpolicy exists"
---
v2 -> v3:
- Combined with commit "x86/cpufreq: add "cpufreq=amd-cppc,active" para"
- Refactor doc about "active mode"
- Change opt_cpufreq_active to opt_active_mode
- Let caller pass epp_init when unspecified to allow the function parameter to be of uint8_t
- Make epp_init per-cpu value
---
v3 -> v4:
- doc refinement
- use MASK_EXTR() to get epp value
- fix indentation
- replace if-else() with switch()
- combine successive comments and do refinement
- no need to introduce amd_cppc_epp_update_limit() as a wrapper
- rename cpufreq_parse_policy() with cpufreq_policy_from_governor()
- no need to use case-insensitive comparison
---
v4 -> v5:
- refine doc to state what the default is for "active" sub-option and it's of boolean nature
- excess blank after << for AMD_CPPC_EPP_MASK
- set max_perf with lowest_perf to get utmost powersave
- refine commit message to include description about relation between "policy" and "governor"
---
v5 -> v6:
- expand comment for "epp" field
- let min_perf set with lowest_nonliner_perf, not lowest_perf, to constrain performance tuning in P-states range
- refactor doc and comments
- blank lines between non-fall-through case blocks
- introduce and add entry for "CPUFREQ_POLICY_ONDEMAND"
---
v6 -> v7
- make opt_active_mode __initdata when NDEBUG=y
- add assertion check for must-zero des_perf in active mode
- use the local variable max_perf and min_perf
- read_epp_init() doesn't worth a separate function
---
v7 -> v8:
- use "ASSERT(!opt_active_mode || !des_perf);" to remove #ifndef NDEBUG
- add a new helper amd_cppc_prepare_policy()
---
v8 -> v9:
- Adapt to changes of "Embed struct amd_cppc_drv_data{} into struct cpufreq_policy{}"
---
v9 - v10
- rewind the changes in v9
--- docs/misc/xen-command-line.pandoc | 9 +- xen/arch/x86/acpi/cpufreq/amd-cppc.c | 135 ++++++++++++++++++++++++++- xen/drivers/cpufreq/utility.c | 15 +++ xen/include/acpi/cpufreq/cpufreq.h | 18 ++++ xen/include/public/sysctl.h | 1 + 5 files changed, 173 insertions(+), 5 deletions(-)
docs/misc/xen-command-line.pandoc +8 -1
@@ -515,7 +515,7 @@ If set, force use of the performance counters for oprofile, rather than detectin available support. ### cpufreq -> `= none | {{ <boolean> | xen } { [:[powersave|performance|ondemand|userspace][,[<maxfreq>]][,[<minfreq>]]] } [,verbose]} | dom0-kernel | hwp[:[<hdc>][,verbose]] | amd-cppc[:[verbose]]` +> `= none | {{ <boolean> | xen } { [:[powersave|performance|ondemand|userspace][,[<maxfreq>]][,[<minfreq>]]] } [,verbose]} | dom0-kernel | hwp[:[<hdc>][,verbose]] | amd-cppc[:[active][,verbose]]` > Default: `xen`
@@ -537,6 +537,13 @@ choice of `dom0-kernel` is deprecated and not supported by all Dom0 kernels. * `amd-cppc` selects ACPI Collaborative Performance and Power Control (CPPC) on supported AMD hardware to provide finer grained frequency control mechanism. The default is disabled. +* `active` is a boolean to enable amd-cppc driver in active(autonomous) mode. + In this mode, users don't rely on Xen governor to do performance monitoring + and tuning. Hardware built-in CPPC power algorithm will calculate the runtime + workload and adjust cores frequency automatically according to the power + supply, thermal, core voltage and some other hardware conditions. + The default is disabled, and the option only applies when `amd-cppc` is + enabled. There is also support for `;`-separated fallback options: `cpufreq=hwp;xen,verbose`. This first tries `hwp` and falls back to `xen` if
xen/arch/x86/acpi/cpufreq/amd-cppc.c +131 -4
187 lines not on this page · raw message
xen/drivers/cpufreq/utility.c +15 -0
@@ -250,6 +250,7 @@ int __cpufreq_set_policy(struct cpufreq_policy *data, data->min = policy->min; data->max = policy->max; data->limits = policy->limits; + data->policy = policy->policy;if (cpufreq_driver.setpolicy)return alternative_call (cpufreq_driver.setpolicy, data);
@@ -281,3 +282,17 @@ int __cpufreq_set_policy(struct cpufreq_policy *data,return __cpufreq_governor (data,CPUFREQ_GOV_LIMITS ); } + +unsigned int cpufreq_policy_from_governor (const struct cpufreq_governor *gov) +{ +if ( !strncmp (gov->name,"performance" ,CPUFREQ_NAME_LEN ) ) +return CPUFREQ_POLICY_PERFORMANCE ; + +if ( !strncmp (gov->name,"powersave" ,CPUFREQ_NAME_LEN ) ) +return CPUFREQ_POLICY_POWERSAVE ; + +if ( !strncmp (gov->name,"ondemand" ,CPUFREQ_NAME_LEN ) ) +return CPUFREQ_POLICY_ONDEMAND ; + +return CPUFREQ_POLICY_UNKNOWN ; +}
xen/include/acpi/cpufreq/cpufreq.h +18 -0
@@ -81,6 +81,7 @@ struct cpufreq_policy {int8_t turbo;/* tristate flag: 0 for unsupported * -1 for disable, 1 for enabled * See CPUFREQ_TURBO_* below for defines */ +unsigned int policy;/* CPUFREQ_POLICY_* */ }; DECLARE_PER_CPU(struct cpufreq_policy *, cpufreq_cpu_policy);
@@ -131,6 +132,23 @@ extern int cpufreq_register_governor(struct cpufreq_governor *governor);extern struct cpufreq_governor *__find_governor (const char *governor);#define CPUFREQ_DEFAULT_GOVERNOR &cpufreq_gov_dbs +/* +* Performance Policy +* If cpufreq_driver->target() exists, the ->governor decides what frequency +* within the limits is used. If cpufreq_driver->setpolicy() exists, these +* following policies are available: +* CPUFREQ_POLICY_PERFORMANCE represents maximum performance +* CPUFREQ_POLICY_POWERSAVE represents least power consumption +* CPUFREQ_POLICY_ONDEMAND represents no preference over performance or +* powersave +*/ +#define CPUFREQ_POLICY_UNKNOWN 0 +#define CPUFREQ_POLICY_POWERSAVE 1 +#define CPUFREQ_POLICY_PERFORMANCE 2 +#define CPUFREQ_POLICY_ONDEMAND 3 + +unsigned int cpufreq_policy_from_governor (const struct cpufreq_governor *gov); +/* pass a target to the cpufreq driver */ extern int __cpufreq_driver_target(struct cpufreq_policy *policy, unsigned int target_freq,
xen/include/public/sysctl.h +1 -0
@@ -454,6 +454,7 @@ struct xen_set_cppc_para { };#define XEN_AMD_CPPC_DRIVER_NAME "amd-cppc" +#define XEN_AMD_CPPC_EPP_DRIVER_NAME "amd-cppc-epp"#define XEN_HWP_DRIVER_NAME "hwp"/*
Signature · 1 line
2.34.1
PATCH v10 4/8 xen/cpufreq: get performance policy from governor set via xenpm
In reply to Penny ZhengEven if Xen governor is not used in amd-cppc active mode, we could somehow deduce which performance policy (CPUFREQ_POLICY_xxx) user wants to apply through which governor they choose, such as:
If user chooses performance governor, they want maximum performance, then the policy shall be CPUFREQ_POLICY_PERFORMANCE
If user chooses powersave governor, they want the least power consumption, then the policy shall be CPUFREQ_POLICY_POWERSAVE
Function cpufreq_policy_from_governor() is responsible for above transition, and it shall be also effective when users setting new governor through xenpm.
Userspace is a forbidden choice, and if users specify such option, we shall not only give warning message to suggest using "xenpm set-cpufreq-cppc", but also error out.
---
v4 -> v5:
- new commit
---
v5 -> v6:
- refactor warning message
---
v6 -> v7:
- move policy->policy set where it firstly gets introduced
- refactor commit message
---
v7 -> v8:
- policy transition is only limited in CPPC mode
--- xen/drivers/acpi/pm-op.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
xen/drivers/acpi/pm-op.c +11 -0
@@ -207,6 +207,17 @@ static int set_cpufreq_gov(struct xen_sysctl_pm_op *op)if ( new_policy.governor ==NULL )return -EINVAL ; +if ( processor_pminfo[op->cpuid]->init &XEN_CPPC_INIT ) + { + new_policy.policy =cpufreq_policy_from_governor (new_policy.governor); +if ( new_policy.policy ==CPUFREQ_POLICY_UNKNOWN ) + { +printk ("Failed to get performance policy from %s, Try \"xenpm set-cpufreq-cppc\"\n" , + new_policy.governor->name); +return -EINVAL ; + } + } +return __cpufreq_set_policy (old_policy, &new_policy); }
Signature · 1 line
2.34.1
PATCH v10 5/8 tools/cpufreq: extract CPPC para from cpufreq para
In reply to Penny ZhengWe extract cppc info from "struct xen_get_cpufreq_para", where it acts as a member of union, and share the space with governor info. However, it may fail in amd-cppc passive mode, in which governor info and CPPC info could co-exist, and both need to be printed together via xenpm tool. If we tried to still put it in "struct xen_get_cpufreq_para" (e.g. just move out of union), "struct xen_get_cpufreq_para" will enlarge too much to further make xen_sysctl.u exceed 128 bytes.
So we introduce a new sub-field GET_CPUFREQ_CPPC to dedicatedly acquire CPPC-related para, and make get-cpufreq-para invoke GET_CPUFREQ_CPPC if available.
New helpers print_cppc_para() and get_cpufreq_cppc() are introduced to extract CPPC-related parameters process from cpufreq para.
---
v4 -> v5:
- new commit
---
v5 -> v6:
- remove the changes for get-cpufreq-para
---
v6 -> v7:
- make get-cpufreq-para invoke GET_CPUFREQ_CPPC
---
v7 -> v8:
- use structure assignment as it is a alias
- add errno info to the error print
---
v9 -> v10
- drop the outer union
--- tools/include/xenctrl.h | 27 +++++----- tools/libs/ctrl/xc_pm.c | 47 +++++++++++----- tools/misc/xenpm.c | 103 ++++++++++++++++++++++-------------- xen/drivers/acpi/pm-op.c | 43 +++++++++------ xen/include/public/sysctl.h | 31 ++++++----- 5 files changed, 155 insertions(+), 96 deletions(-)
tools/include/xenctrl.h +13 -14
@@ -1924,22 +1924,19 @@ struct xc_get_cpufreq_para {uint32_t cpuinfo_cur_freq;uint32_t cpuinfo_max_freq;uint32_t cpuinfo_min_freq; -union { -struct { -uint32_t scaling_cur_freq; +struct { +uint32_t scaling_cur_freq; -char scaling_governor[CPUFREQ_NAME_LEN ]; -uint32_t scaling_max_freq; -uint32_t scaling_min_freq; +char scaling_governor[CPUFREQ_NAME_LEN ]; +uint32_t scaling_max_freq; +uint32_t scaling_min_freq; -/* for specific governor */ -union { -xc_userspace_t userspace; -xc_ondemand_t ondemand; - } u; - } s; -xc_cppc_para_t cppc_para; - } u; +/* for specific governor */ +union { +xc_userspace_t userspace; +xc_ondemand_t ondemand; + } u; + } s;int32_t turbo_enabled; };
@@ -1953,6 +1950,8 @@ int xc_set_cpufreq_para(xc_interface *xch, int cpuid, int ctrl_type, int ctrl_value);int xc_set_cpufreq_cppc (xc_interface *xch,int cpuid,xc_set_cppc_para_t *set_cppc); +int xc_get_cppc_para (xc_interface *xch,unsigned int cpuid, +xc_cppc_para_t *cppc_para);int xc_get_cpufreq_avgfreq (xc_interface *xch,int cpuid,int *avg_freq);int xc_set_sched_opt_smt (xc_interface *xch,uint32_t value);
tools/libs/ctrl/xc_pm.c +35 -12
66 lines not on this page · raw message
tools/misc/xenpm.c +64 -39
154 lines not on this page · raw message
xen/drivers/acpi/pm-op.c +28 -15
78 lines not on this page · raw message
xen/include/public/sysctl.h +15 -16
@@ -478,22 +478,19 @@ struct xen_get_cpufreq_para {uint32_t cpuinfo_cur_freq;uint32_t cpuinfo_max_freq;uint32_t cpuinfo_min_freq; -union { -struct { -uint32_t scaling_cur_freq; - -char scaling_governor[CPUFREQ_NAME_LEN ]; -uint32_t scaling_max_freq; -uint32_t scaling_min_freq; - -/* for specific governor */ -union { -struct xen_userspace userspace; -struct xen_ondemand ondemand; - } u; - } s; -struct xen_get_cppc_para cppc_para; - } u; +struct { +uint32_t scaling_cur_freq; + +char scaling_governor[CPUFREQ_NAME_LEN ]; +uint32_t scaling_max_freq; +uint32_t scaling_min_freq; + +/* for specific governor */ +union { +struct xen_userspace userspace; +struct xen_ondemand ondemand; + } u; + } s;int32_t turbo_enabled; };
@@ -523,6 +520,7 @@ struct xen_sysctl_pm_op {#define SET_CPUFREQ_PARA (CPUFREQ_PARA | 0x03)#define GET_CPUFREQ_AVGFREQ (CPUFREQ_PARA | 0x04)#define SET_CPUFREQ_CPPC (CPUFREQ_PARA | 0x05) +#define GET_CPUFREQ_CPPC (CPUFREQ_PARA | 0x06)/* set/reset scheduler power saving option */ #define XEN_SYSCTL_pm_op_set_sched_opt_smt 0x21
@@ -547,6 +545,7 @@ struct xen_sysctl_pm_op {uint32_t cpuid;union {struct xen_get_cpufreq_para get_para; +struct xen_get_cppc_para get_cppc;struct xen_set_cpufreq_gov set_gov;struct xen_set_cpufreq_para set_para;struct xen_set_cppc_para set_cppc;
Signature · 1 line
2.34.1
Re: [PATCH v10 5/8] tools/cpufreq: extract CPPC para from cpufreq para
Quoted 17 lines · Penny Zheng
We extract cppc info from "struct
xen_get_cpufreq_para", where it acts as a member of union, and share the space with governor info. However, it may fail in amd-cppc passive mode, in which governor info and CPPC info could co-exist, and both need to be printed together via xenpm tool. If we tried to still put it in "structxen_get_cpufreq_para" (e.g. just move out of union), "structxen_get_cpufreq_para" will enlarge too much to further make xen_sysctl.u exceed 128 bytes.So we introduce a new sub-field
GET_CPUFREQ_CPPCto dedicatedly acquire CPPC-related para, and make get-cpufreq-para invokeGET_CPUFREQ_CPPCif available.
New helpersprint_cppc_para()andget_cpufreq_cppc()are introduced to extract CPPC-related parameters process from cpufreq para.Signed-off-by Penny Zheng <[email protected]>Acked-by Anthony PERARD <[email protected]>
Quoted 16 lines
---
v4 -> v5:
- new commit
---
v5 -> v6:
- remove the changes for get-cpufreq-para
---
v6 -> v7:
- make get-cpufreq-para invokeGET_CPUFREQ_CPPC
---
v7 -> v8:
- use structure assignment as it is a alias
- add errno info to the error print
---
v9 -> v10
- drop the outer union
In the interest of getting this series in I think we will want to take this patch as is (I yet have to see the other, related patch though), but ...
Quoted 25 lines
xen/include/public/sysctl.h +3
-16@@ -478,22 +478,19 @@ struct xen_get_cpufreq_para {uint32_t cpuinfo_cur_freq;uint32_t cpuinfo_max_freq;uint32_t cpuinfo_min_freq; -union { -struct { -uint32_t scaling_cur_freq; - -char scaling_governor[CPUFREQ_NAME_LEN ]; -uint32_t scaling_max_freq; -uint32_t scaling_min_freq; - -/* for specific governor */ -union { -struct xen_userspace userspace; -struct xen_ondemand ondemand; - } u; - } s; -struct xen_get_cppc_para cppc_para; - } u; +struct { +uint32_t scaling_cur_freq; +
xen/include/public/sysctl.h struct xen_get_cpufreq_para { · line 493
Quoted 10 lines
xen/include/public/sysctl.h +10
-0+char scaling_governor[CPUFREQ_NAME_LEN ]; +uint32_t scaling_max_freq; +uint32_t scaling_min_freq; + +/* for specific governor */ +union { +struct xen_userspace userspace; +struct xen_ondemand ondemand; + } u; + } s;
... I don't quite see why we'd need to retain the nested struct now either. Imo we ought to be cleaning this up for 4.22.
Jan
PATCH v10 6/8 xen/cpufreq: bypass governor-related para for amd-cppc-epp
In reply to Penny ZhengHWP and amd-cppc-epp are both governor-less driver, so we introduce "is_governor_less" flag and cpufreq_is_governorless() to help bypass governor-related info on dealing with cpufreq para.
---
v3 -> v4:
- Include validation check fix here
---
v4 -> v5:
- validation check has beem moved to where XEN_PROCESSOR_PM_CPPC and XEN_CPPC_INIT have been firstly introduced
- adding "cpufreq_driver.setpolicy == NULL" check to exclude governor-related para for amd-cppc-epp driver in get/set_cpufreq_para()
---
v5 -> v6:
- add helper cpufreq_is_governorless() to tell whether cpufreq driver is governor-less
---
v6 -> v7:
- change "hw_auto" to "is_goverless"
- complement comment
- wrap around with PM_OP to avoid violating Misra rule 2.1
---
v7 -> v8:
- change "is_goverless" to "is_governor_less"
- make cpufreq_is_governorless() inline function
--- tools/misc/xenpm.c | 10 +++++++--- xen/drivers/acpi/pm-op.c | 4 ++-- xen/include/acpi/cpufreq/cpufreq.h | 12 ++++++++++++ 3 files changed, 21 insertions(+), 5 deletions(-)
tools/misc/xenpm.c +7 -3
@@ -832,9 +832,13 @@ static void print_cppc_para(unsigned int cpuid,/* print out parameters about cpu frequency */ static void print_cpufreq_para (int cpuid,struct xc_get_cpufreq_para *p_cpufreq) { -bool hwp =strcmp (p_cpufreq->scaling_driver,XEN_HWP_DRIVER_NAME ) ==0 ; +bool is_governor_less = false;int i; +if ( !strcmp (p_cpufreq->scaling_driver,XEN_HWP_DRIVER_NAME ) || + !strcmp (p_cpufreq->scaling_driver,XEN_AMD_CPPC_EPP_DRIVER_NAME ) ) + is_governor_less = true; +printf ("cpu id : %d\n" , cpuid);printf ("affected_cpus :" );
@@ -842,7 +846,7 @@ static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq)printf (" %d" , p_cpufreq->affected_cpus[i]);printf ("\n" ); -if ( hwp ) +if ( is_governor_less )printf ("cpuinfo frequency : base [%" PRIu32"] max [%" PRIu32"]\n" , p_cpufreq->cpuinfo_min_freq, p_cpufreq->cpuinfo_max_freq);
@@ -854,7 +858,7 @@ static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq)printf ("scaling_driver : %s\n" , p_cpufreq->scaling_driver); -if ( !hwp ) +if ( !is_governor_less ) {if ( p_cpufreq->gov_num ) printf("scaling_avail_gov : %s\n",
xen/drivers/acpi/pm-op.c +2 -2
@@ -154,7 +154,7 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op)else strlcpy (op->u.get_para.scaling_driver,"Unknown" ,CPUFREQ_NAME_LEN ); -if ( !hwp_active () ) +if ( !cpufreq_is_governorless (op->cpuid) ) {if ( !(scaling_available_governors =xzalloc_array (char, gov_num *CPUFREQ_NAME_LEN )) )
@@ -240,7 +240,7 @@ static int set_cpufreq_para(struct xen_sysctl_pm_op *op)if ( !policy || !policy->governor )return -EINVAL ; -if (hwp_active () ) +if (cpufreq_is_governorless (op->cpuid) )return -EOPNOTSUPP ; switch( op->u.set_para.ctrl_type )
xen/include/acpi/cpufreq/cpufreq.h +12 -0
@@ -294,4 +294,16 @@ int acpi_cpufreq_register(void);int amd_cppc_cmdline_parse (const char *s,const char *e);int amd_cppc_register_driver (void ); +/* +* Governor-less cpufreq driver indicates the driver doesn't rely on Xen +* governor to do performance tuning, mostly it has hardware built-in +* algorithm to calculate runtime workload and adjust cores frequency +* automatically, like Intel HWP, or CPPC in AMD. +*/ +static inline bool cpufreq_is_governorless (unsigned int cpuid) +{ +return processor_pminfo[cpuid]->init && (hwp_active () || + cpufreq_driver.setpolicy); +} +#endif /* __XEN_CPUFREQ_PM_H__ */
Signature · 1 line
2.34.1
Re: [PATCH v10 6/8] xen/cpufreq: bypass governor-related para for amd-cppc-epp
Quoted 7 lines · Penny Zheng
xen/include/acpi/cpufreq/cpufreq.h +1
-0@@ -294,4 +294,16 @@ int acpi_cpufreq_register(void);int amd_cppc_cmdline_parse (const char *s,const char *e);int amd_cppc_register_driver (void ); +/*
xen/include/acpi/cpufreq/cpufreq.h int acpi_cpufreq_register(void); · line 307
Quoted 10 lines
xen/include/acpi/cpufreq/cpufreq.h +10
-0+* Governor-less cpufreq driver indicates the driver doesn't rely on Xen +* governor to do performance tuning, mostly it has hardware built-in +* algorithm to calculate runtime workload and adjust cores frequency +* automatically, like Intel HWP, or CPPC in AMD. +*/ +static inline bool cpufreq_is_governorless (unsigned int cpuid) +{ +return processor_pminfo[cpuid]->init && (hwp_active () || + cpufreq_driver.setpolicy); +}
I have to admit that I'm quite disappointed, considering that I had made it clear that you're expected to make sure you submit Misra-clean patches: This introduces a new rule 5.3 violation. Which is even more so odd when - iirc - there, earlier on, already was an issue with you naming a variable or parameter "cpuid". Once again, in the interest of getting this in, I will fix this up for you, but you really shouldn't be using committers' time like this.
Jan
PATCH v10 7/8 xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver
In reply to Penny ZhengIntroduce helper set_amd_cppc_para() and get_amd_cppc_para() to SET/GET CPPC-related para for amd-cppc/amd-cppc-epp driver.
In get_cpufreq_cppc()/set_cpufreq_cppc(), we include "processor_pminfo[cpuid]->init & XEN_CPPC_INIT" condition check to deal with cpufreq driver in amd-cppc.
We borrow governor field to indicate policy info for CPPC active mode, so we need to move the copying of the governor name out of the !cpufreq_is_governorless() guard.
---
v1 -> v2:
- Give the variable des_perf an initializer of 0
- Use the strncmp()s directly in the if()
---
v3 -> v4
- refactor comments
- remove double blank lines
- replace amd_cppc_in_use flag with XEN_PROCESSOR_PM_CPPC
---
v4 -> v5:
- add new field "policy" in "struct xen_cppc_para"
- add new performamce policy XEN_CPUFREQ_POLICY_BALANCE
- drop string comparisons with "processor_pminfo[cpuid]->init & XEN_CPPC_INIT" and "cpufreq.setpolicy == NULL"
- Blank line ahead of the main "return" of a function
- refactor comments, commit message and title
---
v5 -> v6:
- remove duplicated manifest constants, and just move it to public header
- use "else if" to avoid confusion that it looks as if both paths could be taken
- add check for legitimate perf values
- use "unknown" instead of "none"
- introduce "CPUFREQ_POLICY_END" for array overrun check in user space tools
---
v6 -> v7:
- use ARRAY_SIZE() instead
- ->policy print is avoided in passive mode and print "unknown" in invalid cases
- let cpufreq_is_governorless() being the variable's initializer
- refactor with the conditional operator to increase readability
- move duplicated defination ahead and use local variable
- avoid using "else-condition" to bring "dead code" in Misra's nomeclature
- move the comment out of public header and into the respective internal struct field
- wrap set{,get}_amd_cppc_para() with CONFIG_PM_OP
- add symmetry scenario for maximum check
---
v7 -> v8:
- change function name to amd_cppc_get{,set}_para()
- fix too deep indentation, and indent according to pending open parentheses
- missing -EINVAL when no flag is set at all
- use new helper amd_cppc_prepare_policy() to reduce redundancy
- borrow governor field to indicate policy info
---
v8 -> v9
- add description of "moving the copying of the governor name"
- Adapt to changes of "Embed struct amd_cppc_drv_data{} into struct cpufreq_policy{}"
---
v9 -> v10
- adapt to changes of "dropping outter union"
- rewind changes in v8
--- tools/misc/xenpm.c | 13 ++- xen/arch/x86/acpi/cpufreq/amd-cppc.c | 164 +++++++++++++++++++++++++++ xen/drivers/acpi/pm-op.c | 28 +++-- xen/include/acpi/cpufreq/cpufreq.h | 4 + 4 files changed, 196 insertions(+), 13 deletions(-)
tools/misc/xenpm.c +10 -3
@@ -832,11 +832,14 @@ static void print_cppc_para(unsigned int cpuid,/* print out parameters about cpu frequency */ static void print_cpufreq_para (int cpuid,struct xc_get_cpufreq_para *p_cpufreq) { -bool is_governor_less = false; +bool is_governor_less = false, is_cppc_active = false;int i; -if ( !strcmp (p_cpufreq->scaling_driver,XEN_HWP_DRIVER_NAME ) || - !strcmp (p_cpufreq->scaling_driver,XEN_AMD_CPPC_EPP_DRIVER_NAME ) ) +if ( !strcmp (p_cpufreq->scaling_driver,XEN_AMD_CPPC_EPP_DRIVER_NAME ) ) + is_cppc_active = true; + +if ( is_cppc_active || + !strcmp (p_cpufreq->scaling_driver,XEN_HWP_DRIVER_NAME ) ) is_governor_less = true;printf ("cpu id : %d\n" , cpuid);
@@ -899,6 +902,10 @@ static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq) p_cpufreq->s.scaling_cur_freq); } +/* Translate governor info to policy info in CPPC active mode */ +if ( is_cppc_active ) +printf ("policy : %s\n" , p_cpufreq->s.scaling_governor); +printf ("turbo mode : %s\n" , p_cpufreq->turbo_enabled ?"enabled" :"disabled or n/a" );printf ("\n" );
xen/arch/x86/acpi/cpufreq/amd-cppc.c +164 -0
170 lines not on this page · raw message
xen/drivers/acpi/pm-op.c +18 -10
@@ -84,6 +84,8 @@ static int get_cpufreq_cppc(unsigned int cpu,if (hwp_active () ) ret =get_hwp_para (cpu, cppc_para); +else if ( processor_pminfo[cpu]->init &XEN_CPPC_INIT ) + ret =amd_cppc_get_para (per_cpu (cpufreq_cpu_policy, cpu), cppc_para);return ret; }
@@ -154,6 +156,17 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op)else strlcpy (op->u.get_para.scaling_driver,"Unknown" ,CPUFREQ_NAME_LEN ); +/* +* In CPPC active mode, we are borrowing governor field to indicate +* policy info. +*/ +if ( policy->governor->name[0 ] ) +strlcpy (op->u.get_para.s.scaling_governor, + policy->governor->name,CPUFREQ_NAME_LEN ); +else +strlcpy (op->u.get_para.s.scaling_governor,"Unknown" , +CPUFREQ_NAME_LEN ); +if ( !cpufreq_is_governorless (op->cpuid) ) { if ( !(scaling_available_governors =
@@ -178,13 +191,6 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op) op->u.get_para.s.scaling_max_freq = policy->max; op->u.get_para.s.scaling_min_freq = policy->min; -if ( policy->governor->name[0 ] ) -strlcpy (op->u.get_para.s.scaling_governor, - policy->governor->name,CPUFREQ_NAME_LEN ); -else -strlcpy (op->u.get_para.s.scaling_governor,"Unknown" , -CPUFREQ_NAME_LEN ); -/* governor specific para */ if ( !strncasecmp (op->u.get_para.s.scaling_governor,"userspace" ,CPUFREQ_NAME_LEN ) )
@@ -321,10 +327,12 @@ static int set_cpufreq_cppc(struct xen_sysctl_pm_op *op)if ( !policy || !policy->governor )return -ENOENT ; -if ( !hwp_active () ) -return -EOPNOTSUPP ; +if (hwp_active () ) +return set_hwp_para (policy, &op->u.set_cppc); +if ( processor_pminfo[op->cpuid]->init &XEN_CPPC_INIT ) +return amd_cppc_set_para (policy, &op->u.set_cppc); -return set_hwp_para (policy, &op->u.set_cppc); +return -EOPNOTSUPP ; }int do_pm_op (struct xen_sysctl_pm_op *op)
xen/include/acpi/cpufreq/cpufreq.h +4 -0
@@ -293,6 +293,10 @@ int acpi_cpufreq_register(void);int amd_cppc_cmdline_parse (const char *s,const char *e);int amd_cppc_register_driver (void ); +int amd_cppc_get_para (const struct cpufreq_policy *policy, +struct xen_get_cppc_para *cppc_para); +int amd_cppc_set_para (struct cpufreq_policy *policy, +const struct xen_set_cppc_para *set_cppc);/* * Governor-less cpufreq driver indicates the driver doesn't rely on Xen
Signature · 1 line
2.34.1
Re: [PATCH v10 7/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver
xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 163
Quoted 9 lines · Penny Zheng
xen/drivers/acpi/pm-op.c +5
-0@@ -154,6 +156,17 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op)else strlcpy (op->u.get_para.scaling_driver,"Unknown" ,CPUFREQ_NAME_LEN ); +/* +* In CPPC active mode, we are borrowing governor field to indicate +* policy info. +*/ +if ( policy->governor->name[0 ] )
amd_cppc_prepare_policy() may leave ->governor set to NULL afaics, so I think you need to add a NULL check here alongside with pulling this out of ...
xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 171
Quoted 8 lines
xen/drivers/acpi/pm-op.c +6
-0+strlcpy (op->u.get_para.s.scaling_governor, + policy->governor->name,CPUFREQ_NAME_LEN ); + else + strlcpy(op->u.get_para.s.scaling_governor, "Unknown", +CPUFREQ_NAME_LEN ); +if ( !cpufreq_is_governorless (op->cpuid) ) {
... this conditional.
The description also continues to not mention the effect for HWP. I'm actually somewhat confused, I suppose (Jason, question mainly to you):
HWP falls in the governor-less category, iirc. Yet it doesn't supply a .setpolicy hook, hence __cpufreq_set_policy() goes through the normal governor setting logic. What's the deal here? The answer may affect whether I'd deem the pulling out of the conditional correct (or at least benign) here as to HWP.
Jan
Quoted 14 lines
xen/drivers/acpi/pm-op.c +0
-7@@ -178,13 +191,6 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op) op->u.get_para.s.scaling_max_freq = policy->max; op->u.get_para.s.scaling_min_freq = policy->min; -if ( policy->governor->name[0 ] ) -strlcpy (op->u.get_para.s.scaling_governor, - policy->governor->name,CPUFREQ_NAME_LEN ); -else -strlcpy (op->u.get_para.s.scaling_governor,"Unknown" , -CPUFREQ_NAME_LEN ); -/* governor specific para */ if ( !strncasecmp (op->u.get_para.s.scaling_governor,"userspace" ,CPUFREQ_NAME_LEN ) )
Re: [PATCH v10 7/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver
Quoted 26 lines · Jan Beulich
xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 163
Quoted 9 lines · Penny Zheng
xen/drivers/acpi/pm-op.c +5
-0@@ -154,6 +156,17 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op)else strlcpy (op->u.get_para.scaling_driver,"Unknown" ,CPUFREQ_NAME_LEN ); +/* +* In CPPC active mode, we are borrowing governor field to indicate +* policy info. +*/ +if ( policy->governor->name[0 ] )
amd_cppc_prepare_policy()may leave ->governor set to NULL afaics, so I think you need to add a NULL check here alongside with pulling this out of ...xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 171
Quoted 8 lines
xen/drivers/acpi/pm-op.c +6
-0+strlcpy (op->u.get_para.s.scaling_governor, + policy->governor->name,CPUFREQ_NAME_LEN ); + else + strlcpy(op->u.get_para.s.scaling_governor, "Unknown", +CPUFREQ_NAME_LEN ); +if ( !cpufreq_is_governorless (op->cpuid) ) {... this conditional.
Quoted 7 lines
The description also continues to not mention the effect for HWP. I'm actually somewhat confused, I suppose (Jason, question mainly to you):
HWP falls in the governor-less category, iirc. Yet it doesn't supply a .setpolicy hook, hence__cpufreq_set_policy()goes through the normal governor setting logic. What's the deal here? The answer may affect whether I'd deem the pulling out of the conditional correct (or at least benign) here as to HWP.
Hi,
When I wrote HWP, I didn't realize using .setpolicy would bypass the governor code. Instead, I implemented the no-op HWP governor, since I thought I needed something as a governor.
set_hwp_para() actually changes the configuration. HWP only implements the equivalent of amd-cppc-epp autonomous (active) mode.
So I think HWP could switch to .setpolicy and drop its governor.
But looking at this hunk:
Review static int set_cpufreq_cppc(struct · line 328
Quoted 3 lines
(quoted diff) +0
-0@@ -321,10 +327,12 @@ static int set_cpufreq_cppc(struct xen_sysctl_pm_op *op) if ( !policy || !policy->governor )
Doesn't this !policy->governor prevent amd-cppc-epp from setting parameters?
xen/drivers/acpi/pm-op.c static int set_cpufreq_cppc(struct xen_sysctl_pm_op *op) · line 336
Quoted 12 lines
xen/drivers/acpi/pm-op.c +5
-3return -ENOENT ; -if ( !hwp_active () ) -return -EOPNOTSUPP ; +if (hwp_active () ) +return set_hwp_para (policy, &op->u.set_cppc); +if ( processor_pminfo[op->cpuid]->init &XEN_CPPC_INIT ) +return amd_cppc_set_para (policy, &op->u.set_cppc); -return set_hwp_para (policy, &op->u.set_cppc); +return -EOPNOTSUPP ; }
So there may be other checks that would need dropping or adjusting to support HWP without a governor.
Thanks,
Jason
Re: [PATCH v10 7/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver
Quoted 46 lines · Jason Andryuk
Quoted 26 lines · Jan Beulich
xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 163
Quoted 9 lines · Penny Zheng
xen/drivers/acpi/pm-op.c +5
-0@@ -154,6 +156,17 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op)else strlcpy (op->u.get_para.scaling_driver,"Unknown" ,CPUFREQ_NAME_LEN ); +/* +* In CPPC active mode, we are borrowing governor field to indicate +* policy info. +*/ +if ( policy->governor->name[0 ] )
amd_cppc_prepare_policy()may leave ->governor set to NULL afaics, so I think you need to add a NULL check here alongside with pulling this out of ...xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 171
Quoted 8 lines
xen/drivers/acpi/pm-op.c +6
-0+strlcpy (op->u.get_para.s.scaling_governor, + policy->governor->name,CPUFREQ_NAME_LEN ); + else + strlcpy(op->u.get_para.s.scaling_governor, "Unknown", +CPUFREQ_NAME_LEN ); +if ( !cpufreq_is_governorless (op->cpuid) ) {... this conditional.
Quoted 7 lines
The description also continues to not mention the effect for HWP. I'm actually somewhat confused, I suppose (Jason, question mainly to you):
HWP falls in the governor-less category, iirc. Yet it doesn't supply a .setpolicy hook, hence__cpufreq_set_policy()goes through the normal governor setting logic. What's the deal here? The answer may affect whether I'd deem the pulling out of the conditional correct (or at least benign) here as to HWP.Hi,
When I wrote HWP, I didn't realize using .setpolicy would bypass the governor code. Instead, I implemented the no-op HWP governor, since I thought I needed something as a governor.
set_hwp_para()actually changes the configuration. HWP only implements the equivalent of amd-cppc-epp autonomous (active) mode.So I think HWP could switch to .setpolicy and drop its governor.
Quoted 8 lines
But looking at this hunk:
Review static int set_cpufreq_cppc(struct · line 328
Quoted 3 lines
(quoted diff) +0
-0@@ -321,10 +327,12 @@ static int set_cpufreq_cppc(struct xen_sysctl_pm_op *op) if ( !policy || !policy->governor )Doesn't this !policy->governor prevent amd-cppc-epp from setting parameters?
Only if amd_cppc_prepare_policy() took the default case path of its switch(), aiui. Penny?
Jan
Quoted 18 lines
xen/drivers/acpi/pm-op.c static int set_cpufreq_cppc(struct xen_sysctl_pm_op *op) · line 336
Quoted 12 lines
xen/drivers/acpi/pm-op.c +5
-3return -ENOENT ; -if ( !hwp_active () ) -return -EOPNOTSUPP ; +if (hwp_active () ) +return set_hwp_para (policy, &op->u.set_cppc); +if ( processor_pminfo[op->cpuid]->init &XEN_CPPC_INIT ) +return amd_cppc_set_para (policy, &op->u.set_cppc); -return set_hwp_para (policy, &op->u.set_cppc); +return -EOPNOTSUPP ; }So there may be other checks that would need dropping or adjusting to support HWP without a governor.
Thanks,
Jason
RE: [PATCH v10 7/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver
[Public]
Quoted 67 lines
-----Original Message-----
From: Jan Beulich <[email protected]>
Sent: Thursday, September 25, 2025 2:12 PM
To: Andryuk, Jason <[email protected]>; Penny, Zheng <[email protected]>
Cc: Huang, Ray <[email protected]>; Anthony PERARD <[email protected]>; Andrew Cooper <[email protected]>; Roger Pau Monné <[email protected]>; [email protected]
Subject: Re: [PATCH v10 7/8] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPCxen_sysctl_pm_opfor amd-cppc driverQuoted 3 lines · Jason Andryuk
Quoted 2 lines · Jan Beulich
Review static int get_cpufreq_para(struct xen_sysctl_pm_op
Quoted 1 line · Penny Zheng
(quoted diff) +0
-0@@ -154,6 +156,17 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op*op)
Quoted 51 lines
Quoted 25 lines
xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 163
Quoted 9 lines
xen/drivers/acpi/pm-op.c +5
-0else strlcpy (op->u.get_para.scaling_driver,"Unknown" ,CPUFREQ_NAME_LEN ); +/* +* In CPPC active mode, we are borrowing governor field to indicate +* policy info. +*/ +if ( policy->governor->name[0 ] )
amd_cppc_prepare_policy()may leave ->governor set to NULL afaics, so I think you need to add a NULL check here alongside with pulling this out of ...xen/drivers/acpi/pm-op.c static int get_cpufreq_para(struct xen_sysctl_pm_op *op) · line 171
Quoted 8 lines
xen/drivers/acpi/pm-op.c +6
-0+strlcpy (op->u.get_para.s.scaling_governor, + policy->governor->name,CPUFREQ_NAME_LEN ); + else + strlcpy(op->u.get_para.s.scaling_governor, "Unknown", +CPUFREQ_NAME_LEN ); +if ( !cpufreq_is_governorless (op->cpuid) ) {... this conditional.
Quoted 8 lines
The description also continues to not mention the effect for HWP. I'm actually somewhat confused, I suppose (Jason, question mainly to you):
HWP falls in the governor-less category, iirc. Yet it doesn't supply a .setpolicy hook, hence__cpufreq_set_policy()goes through the normal governor setting logic. What's the deal here? The answer may affect whether I'd deem the pulling out of the conditional correct (or at least
benign) here as to HWP.Hi,
When I wrote HWP, I didn't realize using .setpolicy would bypass the governor code. Instead, I implemented the no-op HWP governor, since I thought I needed something as a governor.
set_hwp_para()actually changes the configuration. HWP only implements the equivalent of amd-cppc-epp autonomous (active) mode.So I think HWP could switch to .setpolicy and drop its governor.
But looking at this hunk:
Review static int set_cpufreq_cppc(struct >
Quoted 1 line
(quoted diff) +0
-0@@ -321,10 +327,12 @@ static int set_cpufreq_cppc(struct >
xen_sysctl_pm_op*op)Quoted 1 line
xen/drivers/acpi/pm-op.c +0
-0if ( !policy || !policy->governor )
Quoted 6 lines
Quoted 2 lines
Doesn't this !policy->governor prevent amd-cppc-epp from setting parameters?
Only if
amd_cppc_prepare_policy()took the default case path of itsswitch(), aiui. Penny?
Hmmm, I shall admit that I omitted the default case.
Actually, in current codes, no matter it is amd-cppc or amd-cppc-epp, or any other cpufreq driver(except hwp), in its .init(), we have:
``` policy->governor = cpufreq_opt_governor ? : CPUFREQ_DEFAULT_GOVERNOR; ```
So we have CPUFREQ_DEFAULT_GOVERNOR when no specified governor set through cmfline, and it is ondemand... As long as .init() is executed successfully, we will never have NULL governor field right now.
Quoted 20 lines
Jan
Quoted 18 lines
xen/drivers/acpi/pm-op.c static int set_cpufreq_cppc(struct xen_sysctl_pm_op *op) · line 336
Quoted 12 lines
xen/drivers/acpi/pm-op.c +5
-3return -ENOENT ; -if ( !hwp_active () ) -return -EOPNOTSUPP ; +if (hwp_active () ) +return set_hwp_para (policy, &op->u.set_cppc); +if ( processor_pminfo[op->cpuid]->init &XEN_CPPC_INIT ) +return amd_cppc_set_para (policy, &op->u.set_cppc); -return set_hwp_para (policy, &op->u.set_cppc); +return -EOPNOTSUPP ; }So there may be other checks that would need dropping or adjusting to support HWP without a governor.
Thanks,
Jason
PATCH v10 8/8 CHANGELOG.md: add amd-cppc/amd-cppc-epp cpufreq driver support
In reply to Penny Zheng---
v9 -> v10:
- s/Support/New/ and add a full stop at the end
--- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+)
CHANGELOG.md +1 -0
@@ -36,6 +36,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Support in hvmloader for new SMBIOS tables: 7 (Cache Info), 8 (Port Connector), 9 (System Slots), 26 (Voltage Probe), 27 (Cooling Device), and 28 (Temperature Probe). + - New amd-cppc/amd-cppc-epp cpufreq driver. - On Arm: - Ability to enable stack protector
Signature · 1 line
2.34.1
Re: [PATCH v10 8/8] CHANGELOG.md: add amd-cppc/amd-cppc-epp cpufreq driver support
Quoted 13 lines · Penny Zheng
Signed-off-by Penny Zheng<[email protected]>---
v9 -> v10:
- s/Support/New/ and add a full stop at the end--- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+)CHANGELOG.md +0
-0
CHANGELOG.md The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · line 39
Quoted 4 lines
CHANGELOG.md +1
-0@@ -36,6 +36,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Support in hvmloader for new SMBIOS tables: 7 (Cache Info), 8 (Port Connector), 9 (System Slots), 26 (Voltage Probe), 27 (Cooling Device), and 28 (Temperature Probe). + - New amd-cppc/amd-cppc-epp cpufreq driver.
LGTM: Acked-by: Oleksii Kurochko<[email protected]>
Thanks.
~ Oleksii
Quoted 3 lines
CHANGELOG.md +0
-0- On Arm: - Ability to enable stack protector