From patchwork Thu Nov 14 15:22:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11243937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A58E913BD for ; Thu, 14 Nov 2019 15:23:41 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B051206DC for ; Thu, 14 Nov 2019 15:23:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B051206DC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iVGwr-0004yL-HH; Thu, 14 Nov 2019 15:22:17 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iVGwp-0004yE-MF for xen-devel@lists.xenproject.org; Thu, 14 Nov 2019 15:22:15 +0000 X-Inumbo-ID: 892244d0-06f2-11ea-984a-bc764e2007e4 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 892244d0-06f2-11ea-984a-bc764e2007e4; Thu, 14 Nov 2019 15:22:14 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A0178AF13; Thu, 14 Nov 2019 15:22:13 +0000 (UTC) To: "xen-devel@lists.xenproject.org" From: Jan Beulich Message-ID: Date: Thu, 14 Nov 2019 16:22:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 Content-Language: en-US Subject: [Xen-devel] [PATCH] x86/cpuidle: correct Cannon Lake residency MSRs X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Andrew Cooper , Wei Liu , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" As per SDM rev 071 Cannon Lake has - no CC3 residency MSR at 3FC, - a CC1 residency MSR ar 660 (like various Atoms), - a useless (always zero) CC3 residency MSR at 662. Signed-off-by: Jan Beulich --- Using the MSR cross reference in the same SDM revision one might even get the impression that further MSRs are unavailable, but newer CPUs don't appear to be consistently listed there at all, so may rather be a doc shortcoming. I've pointed this out to Intel, but I'm not expecting swift feedback. --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -68,7 +68,7 @@ #define GET_PC8_RES(val) GET_HW_RES_IN_NS(0x630, val) /* some Haswells only */ #define GET_PC9_RES(val) GET_HW_RES_IN_NS(0x631, val) /* some Haswells only */ #define GET_PC10_RES(val) GET_HW_RES_IN_NS(0x632, val) /* some Haswells only */ -#define GET_CC1_RES(val) GET_HW_RES_IN_NS(0x660, val) /* Silvermont only */ +#define GET_CC1_RES(val) GET_HW_RES_IN_NS(0x660, val) #define GET_CC3_RES(val) GET_HW_RES_IN_NS(0x3FC, val) #define GET_CC6_RES(val) GET_HW_RES_IN_NS(0x3FD, val) #define GET_CC7_RES(val) GET_HW_RES_IN_NS(0x3FE, val) /* SNB onwards */ @@ -179,8 +179,6 @@ static void do_get_hw_residencies(void * case 0x4E: case 0x55: case 0x5E: - /* Cannon Lake */ - case 0x66: /* Kaby Lake */ case 0x8E: case 0x9E: @@ -202,6 +200,16 @@ static void do_get_hw_residencies(void * GET_CC3_RES(hw_res->cc3); GET_CC6_RES(hw_res->cc6); break; + /* Cannon Lake */ + case 0x66: + GET_PC2_RES(hw_res->pc2); + GET_PC3_RES(hw_res->pc3); + GET_PC6_RES(hw_res->pc6); + GET_PC7_RES(hw_res->pc7); + GET_CC1_RES(hw_res->cc1); + GET_CC6_RES(hw_res->cc6); + GET_CC7_RES(hw_res->cc7); + break; /* Xeon Phi Knights Landing */ case 0x57: /* Xeon Phi Knights Mill */