Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-05-09 Thread Ido Schimmel
On Thu, May 09, 2019 at 07:18:28PM +0200, Rafael J. Wysocki wrote: > So does the patch below fix it for you? Yes. Thanks for the fix. Feel free to add my tag: Tested-by: Ido Schimmel

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-05-09 Thread Rafael J. Wysocki
On Thursday, May 9, 2019 12:23:15 PM CEST Ido Schimmel wrote: > On Thu, Mar 21, 2019 at 11:20:17PM +0100, Rafael J. Wysocki wrote: > > +static struct attribute *intel_epb_attrs[] = { > > + _attr_energy_perf_bias.attr, > > + NULL > > +}; > > + > > +static const struct attribute_group

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-05-09 Thread Ido Schimmel
On Thu, Mar 21, 2019 at 11:20:17PM +0100, Rafael J. Wysocki wrote: > +static struct attribute *intel_epb_attrs[] = { > + _attr_energy_perf_bias.attr, > + NULL > +}; > + > +static const struct attribute_group intel_epb_attr_group = { > + .name = power_group_name, > + .attrs =

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-03-25 Thread Borislav Petkov
On Thu, Mar 21, 2019 at 11:20:17PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The Performance and Energy Bias Hint (EPB) is expected to be set by > user space through the generic MSR interface, but that interface is > not particularly nice and there are security concerns

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-03-25 Thread Rafael J. Wysocki
On Fri, Mar 22, 2019 at 3:46 PM Borislav Petkov wrote: > > First of all, thanks a lot for doing that! > > This is a good example for how we should convert all the /dev/msr > accessing tools. > > Nitpicks below. > > On Thu, Mar 21, 2019 at 11:20:17PM +0100, Rafael J. Wysocki wrote: > > From:

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-03-25 Thread Rafael J. Wysocki
On Fri, Mar 22, 2019 at 4:00 PM Peter Zijlstra wrote: > > On Thu, Mar 21, 2019 at 11:20:17PM +0100, Rafael J. Wysocki wrote: > > + ret = rdmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, ); > > + if (ret < 0) > > + return ret; > > + > > + ret = wrmsrl_on_cpu(cpu,

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-03-22 Thread Peter Zijlstra
On Thu, Mar 21, 2019 at 11:20:17PM +0100, Rafael J. Wysocki wrote: > + ret = rdmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, ); > + if (ret < 0) > + return ret; > + > + ret = wrmsrl_on_cpu(cpu, MSR_IA32_ENERGY_PERF_BIAS, > + (epb & ~EPB_MASK) | val);

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-03-22 Thread Borislav Petkov
First of all, thanks a lot for doing that! This is a good example for how we should convert all the /dev/msr accessing tools. Nitpicks below. On Thu, Mar 21, 2019 at 11:20:17PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The Performance and Energy Bias Hint (EPB) is expected

Re: [PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-03-22 Thread Hannes Reinecke
On 3/21/19 11:20 PM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki The Performance and Energy Bias Hint (EPB) is expected to be set by user space through the generic MSR interface, but that interface is not particularly nice and there are security concerns regarding it, so it is not always

[PATCH 2/2] PM / arch: x86: MSR_IA32_ENERGY_PERF_BIAS sysfs interface

2019-03-21 Thread Rafael J. Wysocki
From: Rafael J. Wysocki The Performance and Energy Bias Hint (EPB) is expected to be set by user space through the generic MSR interface, but that interface is not particularly nice and there are security concerns regarding it, so it is not always available. For this reason, add a sysfs