From patchwork Mon Oct 8 15:06:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prarit Bhargava X-Patchwork-Id: 10630931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 888E016B1 for ; Mon, 8 Oct 2018 15:06:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78A1E29655 for ; Mon, 8 Oct 2018 15:06:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B81B29670; Mon, 8 Oct 2018 15:06:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26A9529655 for ; Mon, 8 Oct 2018 15:06:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726278AbeJHWSb (ORCPT ); Mon, 8 Oct 2018 18:18:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56778 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbeJHWSa (ORCPT ); Mon, 8 Oct 2018 18:18:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 553DDC049D66; Mon, 8 Oct 2018 15:06:21 +0000 (UTC) Received: from prarit.khw1.lab.eng.bos.redhat.com (prarit-guest.khw1.lab.eng.bos.redhat.com [10.16.200.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id C33FB194A8; Mon, 8 Oct 2018 15:06:20 +0000 (UTC) From: Prarit Bhargava To: linux-pm@vger.kernel.org Cc: Prarit Bhargava , Shuah Khan , Stafford Horne Subject: [PATCH 0/2] cpupower: Fix AMD Family 0x17 crash on VMWare guests Date: Mon, 8 Oct 2018 11:06:17 -0400 Message-Id: <20181008150619.22531-1-prarit@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 08 Oct 2018 15:06:21 +0000 (UTC) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Shuah Khan Cc: Stafford Horne 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(-)