From patchwork Mon Jan 6 18:59:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dirk.brandewie@gmail.com X-Patchwork-Id: 3440311 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E1A1C02DC for ; Mon, 6 Jan 2014 18:59:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C02120166 for ; Mon, 6 Jan 2014 18:59:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0CE6A20179 for ; Mon, 6 Jan 2014 18:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755479AbaAFS7Y (ORCPT ); Mon, 6 Jan 2014 13:59:24 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:42348 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755276AbaAFS7Y (ORCPT ); Mon, 6 Jan 2014 13:59:24 -0500 Received: by mail-pd0-f175.google.com with SMTP id w10so18469040pde.20 for ; Mon, 06 Jan 2014 10:59:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Phi0xD1PxYSG1s4643ER40UdqDNNLglxAMyBd9uJ6hI=; b=ct5Zcer7x1STS7TWC+V5nTrKANkdFa7Yq3yU6ArltRKu3NWNJK9oew7lSi97dK6pzm KmC9qi9A/LY3XrvDxzfp7snO+hWauJlEQ06nKnml181eFrfEJqS1+z5HfTCW3beL3HdK 0nRkD69t+iAsyOMVleW/mpvy2xB0EPwS+oj6k70W4JfjEmM4zh8hGQR+g2hIle6LuszV pwgMPptYtYc/Zas+Wklxp7RP+sW6KabdAMm7JsbDsOGIrBNtdTDam5c4qic2ud2gUqcH /uMqKXUgCoqvImjI1+I3mkoSl5Yh9Y26YM/4vFT97o9sGhE3vxa5MKVLlpiq+gCfifus HNzw== X-Received: by 10.68.99.226 with SMTP id et2mr82004477pbb.8.1389034763931; Mon, 06 Jan 2014 10:59:23 -0800 (PST) Received: from echolake.localdomain (static-50-43-35-129.bvtn.or.frontiernet.net. [50.43.35.129]) by mx.google.com with ESMTPSA id un5sm78966951pab.3.2014.01.06.10.59.17 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Mon, 06 Jan 2014 10:59:18 -0800 (PST) From: dirk.brandewie@gmail.com To: linux-pm@vger.kernel.org, rjw@rjwysocki.net Cc: kchamart@redhat.com, jwboyer@fedoraproject.org, pbonzini@redhat.com, gleb@minantech.com, Dirk Brandewie , All applicable Subject: [PATCH] intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters. Date: Mon, 6 Jan 2014 10:59:16 -0800 Message-Id: <1389034756-2262-1-git-send-email-dirk.j.brandewie@intel.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dirk Brandewie KVM environments do not support APERF/MPERF MSRs. intel_pstate cannot operate without these registers. The previous validity checks in intel_pstate_msrs_not_valid() are insufficent in nested KVMs. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1046317 Signed-off-by: Dirk Brandewie Cc: All applicable --- drivers/cpufreq/intel_pstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 0f63f5d..fe91dad 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -619,7 +619,8 @@ static void intel_pstate_timer_func(unsigned long __data) } #define ICPU(model, policy) \ - { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)&policy } + { X86_VENDOR_INTEL, 6, model, X86_FEATURE_APERFMPERF,\ + (unsigned long)&policy } static const struct x86_cpu_id intel_pstate_cpu_ids[] = { ICPU(0x2a, core_params),