Right now, no matter for code construction or hardware restriction, HW_ALL shall be the only expected values in _PSD for AMD CPPC mode
Suggested-by: Jan Beulich <[email protected]> Signed-off-by: Penny Zheng <[email protected]> --- v9 - v10: - new commit --- xen/drivers/cpufreq/cpufreq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c index fe6bd7ff25..4b74f5590b 100644 --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -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 || -- 2.34.1
