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.zh...@amd.com> --- v5 -> v6: - new commit --- xen/arch/x86/platform_hypercall.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index 90abd3197f..3eba791889 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -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; -- 2.34.1