Quoting Chris Wilson (2017-07-26 09:39:31)
> Quoting Gabriel Krisman Bertazi (2017-07-26 06:30:16)
> > When reading the i915_energy_uJ debugfs file, it tries to fetch
> > MSR_RAPL_POWER_UNIT, which might not be available, like in a vm
> > environment, causing the exception shown below.
> >
> > We
Quoting Gabriel Krisman Bertazi (2017-07-26 06:30:16)
> Chris Wilson writes:
>
> > Quoting Gabriel Krisman Bertazi (2017-07-25 19:19:22)
> >> power = (power & 0x1f00) >> 8;
> >> units = 100 / (1 << power); /* convert to uJ */
> >> power = I915_READ(MCH_SECP_NRG_STTS);
Chris Wilson writes:
> Quoting Gabriel Krisman Bertazi (2017-07-25 19:19:22)
>> power = (power & 0x1f00) >> 8;
>> units = 100 / (1 << power); /* convert to uJ */
>> power = I915_READ(MCH_SECP_NRG_STTS);
>
> Just after this is a useless cast. Though it will be neater to
Quoting Gabriel Krisman Bertazi (2017-07-25 19:19:22)
> When reading the i915_energy_uJ debugfs file, it tries to fetch
> MSR_RAPL_POWER_UNIT, which might not be available, like in a vm
> environment, causing the exception shown below.
>
> We can easily prevent it by doing a rdmsrl_safe read inste
When reading the i915_energy_uJ debugfs file, it tries to fetch
MSR_RAPL_POWER_UNIT, which might not be available, like in a vm
environment, causing the exception shown below.
We can easily prevent it by doing a rdmsrl_safe read instead, which will
handle the exception, allowing us to abort the de