Re: [PATCH v4 09/15] cpufreq: Export HWP parameters to userspace as CPPC

2023-06-21 Thread Jan Beulich
On 20.06.2023 20:41, Jason Andryuk wrote: > On Mon, Jun 19, 2023 at 10:24 AM Jan Beulich wrote: >> On 14.06.2023 20:02, Jason Andryuk wrote: >>> +else >>> { >>> +if ( !(scaling_available_governors = >>> + xzalloc_array(char, gov_num * CPUFREQ_NAME_LEN)) ) >>> +

Re: [PATCH v4 09/15] cpufreq: Export HWP parameters to userspace as CPPC

2023-06-20 Thread Jason Andryuk
On Mon, Jun 19, 2023 at 10:24 AM Jan Beulich wrote: > > On 14.06.2023 20:02, Jason Andryuk wrote: > > --- a/xen/arch/x86/acpi/cpufreq/hwp.c > > +++ b/xen/arch/x86/acpi/cpufreq/hwp.c > > @@ -537,6 +537,29 @@ static const struct cpufreq_driver __initconstrel > > hwp_cpufreq_driver = > > .updat

Re: [PATCH v4 09/15] cpufreq: Export HWP parameters to userspace as CPPC

2023-06-19 Thread Jan Beulich
On 14.06.2023 20:02, Jason Andryuk wrote: > --- a/xen/arch/x86/acpi/cpufreq/hwp.c > +++ b/xen/arch/x86/acpi/cpufreq/hwp.c > @@ -537,6 +537,29 @@ static const struct cpufreq_driver __initconstrel > hwp_cpufreq_driver = > .update = hwp_cpufreq_update, > }; > > +int get_hwp_para(const unsigne

[PATCH v4 09/15] cpufreq: Export HWP parameters to userspace as CPPC

2023-06-14 Thread Jason Andryuk
Extend xen_get_cpufreq_para to return hwp parameters. HWP is an implementation of ACPI CPPC (Collaborative Processor Performance Control). Use the CPPC name since that might be useful in the future for AMD P-state. We need the features bitmask to indicate fields supported by the actual hardware