[PATCH v10 1/8] xen/cpufreq: make HW_ALL the only expected value for CPPC mode

Penny Zheng posted 8 patches 1 week, 4 days ago
[PATCH v10 1/8] xen/cpufreq: make HW_ALL the only expected value for CPPC mode
Posted by Penny Zheng 1 week, 4 days ago
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 <jbeulich@suse.com>
Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
---
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
Re: [PATCH v10 1/8] xen/cpufreq: make HW_ALL the only expected value for CPPC mode
Posted by Jan Beulich 1 week, 4 days ago
On 23.09.2025 06:38, Penny Zheng wrote:
> 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 <jbeulich@suse.com>
> Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>