mbox series

[0/2] cpupower: Fix AMD Family 0x17 crash on VMWare guests

Message ID 20181008150619.22531-1-prarit@redhat.com (mailing list archive)
Headers show
Series cpupower: Fix AMD Family 0x17 crash on VMWare guests | expand

Message

Prarit Bhargava Oct. 8, 2018, 3:06 p.m. UTC
cpupower crashes on VMWare guests.  The guests have the MD PStateDef MSR
(0xC0010064 + state number) set to zero which causes a divide-by-zero.
cpupower has an off-by-one bug in the msr_pstate data struct for family 0x17,
and the cpupower code needs to be updated to honour the enable bit in
the AMD PstateDef MSR.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Stafford Horne <shorne@gmail.com>

Prarit Bhargava (2):
  cpupower: Fix AMD Family 0x17 msr_pstate size
  cpupower: Fix coredump on VMWare

 tools/power/cpupower/utils/cpufreq-info.c | 2 ++
 tools/power/cpupower/utils/helpers/amd.c  | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

Comments

Shuah Oct. 8, 2018, 3:23 p.m. UTC | #1
On 10/08/2018 09:06 AM, Prarit Bhargava wrote:
> cpupower crashes on VMWare guests.  The guests have the MD PStateDef MSR
> (0xC0010064 + state number) set to zero which causes a divide-by-zero.
> cpupower has an off-by-one bug in the msr_pstate data struct for family 0x17,
> and the cpupower code needs to be updated to honour the enable bit in
> the AMD PstateDef MSR.
> 
> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Stafford Horne <shorne@gmail.com>
> 
> Prarit Bhargava (2):
>   cpupower: Fix AMD Family 0x17 msr_pstate size
>   cpupower: Fix coredump on VMWare
> 
>  tools/power/cpupower/utils/cpufreq-info.c | 2 ++
>  tools/power/cpupower/utils/helpers/amd.c  | 7 ++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 

Applied to git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git cpupower
branch for 4.19-rc8 (depending on timing) or 4.20-rc1.

Assume I can tag this for stable.

thanks,
-- Shuah
Prarit Bhargava Oct. 8, 2018, 3:26 p.m. UTC | #2
On 10/08/2018 11:23 AM, Shuah Khan wrote:
> On 10/08/2018 09:06 AM, Prarit Bhargava wrote:
>> cpupower crashes on VMWare guests.  The guests have the MD PStateDef MSR
>> (0xC0010064 + state number) set to zero which causes a divide-by-zero.
>> cpupower has an off-by-one bug in the msr_pstate data struct for family 0x17,
>> and the cpupower code needs to be updated to honour the enable bit in
>> the AMD PstateDef MSR.
>>
>> Signed-off-by: Prarit Bhargava <prarit@redhat.com>
>> Cc: Shuah Khan <shuah@kernel.org>
>> Cc: Stafford Horne <shorne@gmail.com>
>>
>> Prarit Bhargava (2):
>>   cpupower: Fix AMD Family 0x17 msr_pstate size
>>   cpupower: Fix coredump on VMWare
>>
>>  tools/power/cpupower/utils/cpufreq-info.c | 2 ++
>>  tools/power/cpupower/utils/helpers/amd.c  | 7 ++++++-
>>  2 files changed, 8 insertions(+), 1 deletion(-)
>>
> 
> Applied to git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git cpupower
> branch for 4.19-rc8 (depending on timing) or 4.20-rc1.
> 
> Assume I can tag this for stable.
> 
Please do :)

Thanks,

P.

> thanks,
> -- Shuah
>