xen/cpufreq: neglect unsupported-mode request from DOM0

DOM0 could deliever whatever performance statistic (Px, _CPC) it parses, it is
Xen's responsibility to decide which one it shall accept.
Xen rely on XEN_PROCESSOR_PM_xxx flag to tell which mode ( Px or CPPC )
current cpufreq driver supports, and accepts relative info. It will neglect
unsupported-mode request and yields success.

Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Penny Zheng authored and Jan Beulich committed 2025-07-17 08:57:41 +02:00
1 parent 81ce87fc5e
commit 365e660f0f
1 file changed
+6 -1
+6 -1
View File
@@ -539,9 +539,14 @@ ret_t do_platform_op(
case XEN_PM_PX:
if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
{
ret = -ENOSYS;
/*
* Neglect Px-info when registered cpufreq driver
* isn't in Px mode
*/
ret = 0;
break;
}
ret = set_px_pminfo(op->u.set_pminfo.id, &op->u.set_pminfo.u.perf);
break;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.