From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:54770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727950AbeKBAut (ORCPT ); Thu, 1 Nov 2018 20:50:49 -0400 Date: Thu, 1 Nov 2018 11:47:17 -0400 From: Sasha Levin To: Prarit Bhargava Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , Stafford Horne Subject: Re: [PATCH AUTOSEL 4.19 022/146] cpupower: Fix coredump on VMWare Message-ID: <20181101154717.GZ194472@sasha-vm> References: <20181031230541.28822-1-sashal@kernel.org> <20181031230541.28822-22-sashal@kernel.org> <7c08983b-a8c5-0dbc-c8aa-2c6a6799e1ee@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <7c08983b-a8c5-0dbc-c8aa-2c6a6799e1ee@redhat.com> Sender: stable-owner@vger.kernel.org List-ID: On Thu, Nov 01, 2018 at 07:43:35AM -0400, Prarit Bhargava wrote: > > >On 10/31/2018 07:03 PM, Sasha Levin wrote: >> From: Prarit Bhargava >> >> [ Upstream commit f69ffc5d3db8f1f03fd6d1df5930f9a1fbd787b6 ] >> >> cpupower crashes on VMWare guests. The guests have the AMD PStateDef MSR >> (0xC0010064 + state number) set to zero. As a result fid and did are zero >> and the crash occurs because of a divide by zero (cof = fid/did). This >> can be prevented by checking the enable bit in the PStateDef MSR before >> calculating cof. By doing this the value of pstate[i] remains zero and >> the value can be tested before displaying the active Pstates. >> >> Check the enable bit in the PstateDef register for all supported families >> and only print out enabled Pstates. >> > >Hi Sasha, > >This patch, f69ffc5d3db8, depends on 8c22e2f69592 ("cpupower: Fix AMD Family >0x17 msr_pstate size"). Without 8c22e2f69592 the patch below will always read a >value of "0" and not output the correct data. > >8c22e2f69592 must be applied to any stable branch that f69ffc5d3db8 is applied to. I'll grab it too, thank you. -- Thanks, Sasha