mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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 "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. Signed-off-by: Penny Zheng <Penny.Zheng@amd.com> Acked-by: Jan Beulich <jbeulich@suse.com> # hypervisor Acked-by: Anthony PERARD <anthony.perard@vates.tech>