From patchwork Wed Jun 8 13:49:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9164741 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 48E5460572 for ; Wed, 8 Jun 2016 13:51:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38F4425D91 for ; Wed, 8 Jun 2016 13:51:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D7632824F; Wed, 8 Jun 2016 13:51:50 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ABD9125D91 for ; Wed, 8 Jun 2016 13:51:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAdrV-0006Du-RV; Wed, 08 Jun 2016 13:49:37 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAdrU-0006Dl-HY for xen-devel@lists.xenproject.org; Wed, 08 Jun 2016 13:49:36 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id A8/C2-14904-F6228575; Wed, 08 Jun 2016 13:49:35 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRWlGSWpSXmKPExsXS6fjDSzdfKSL cYEErm8X3LZOZHBg9Dn+4whLAGMWamZeUX5HAmjFh81f2gr9SFRePmzYwLhTvYuTkEBLIk3h+ /icbiM0rYCfRf/IAI4gtIWAosW/+KrA4i4CqRN/haWA2m4C6RNuz7axdjBwcIgIGEueOJoGYz AL6EtvWsYBUCANFzxx5zAQx3U7i3r3X7CA2p4C9xON9W8E6eQUEJf7uEAYJMwOVzF12jX0CI8 8shMwsJBkIW0vi4a9bLBC2tsSyha+ZZ4HtlZZY/o8DImwpsX3NdTZUJSC2i8S6mVfYFjByrGL UKE4tKkst0jU010sqykzPKMlNzMzRNTQw1ctNLS5OTE/NSUwq1kvOz93ECAxUBiDYwXjxtOch RkkOJiVRXkX38HAhvqT8lMqMxOKM+KLSnNTiQ4wyHBxKErwCihHhQoJFqempFWmZOcCYgUlLc PAoifAKg6R5iwsSc4sz0yFSpxgVpcR5zygAJQRAEhmleXBtsDi9xCgrJczLCHSIEE9BalFuZg mq/CtGcQ5GJWFeFZDxPJl5JXDTXwEtZgJavPxIOMjikkSElFQD4+R9G8NtPrr3TpxZ11p2Xq9 SgLFk0d2n7J63eqTO1DtfKLh6vflwyGKvyP6SGzLzMhPdl597tiZuQsRCSV3uN+JWbZ9W7Xnx 4dAUeaXb1jV1c7LW2WZUXtu/KSWg+3zilvy1+4w6D6x+cLHn7BGhDnam5HplCcvF0/+YB67fx xPs8CrkqcOONCWW4oxEQy3mouJEAEdjVcjOAgAA X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-15.tower-206.messagelabs.com!1465393773!31796090!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26281 invoked from network); 8 Jun 2016 13:49:34 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-15.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Jun 2016 13:49:34 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Wed, 08 Jun 2016 07:49:32 -0600 Message-Id: <57583E8A02000078000F31FD@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.0 Date: Wed, 08 Jun 2016 07:49:30 -0600 From: "Jan Beulich" To: "xen-devel" References: <57583E0D02000078000F31F2@prv-mh.provo.novell.com> In-Reply-To: <57583E0D02000078000F31F2@prv-mh.provo.novell.com> Mime-Version: 1.0 Cc: Andrew Cooper Subject: [Xen-devel] [PATCH 1/5] mwait-idle: add SKX support X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP SKX is similar to BDX Signed-off-by: Len Brown [Linux commit: f9e71657c2c0a8f1c50884ab45794be2854e158e] Signed-off-by: Jan Beulich mwait-idle: add SKX support SKX is similar to BDX Signed-off-by: Len Brown [Linux commit: f9e71657c2c0a8f1c50884ab45794be2854e158e] Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -530,6 +530,28 @@ static struct cpuidle_state skl_cstates[ {} }; +static const struct cpuidle_state skx_cstates[] = { + { + .name = "C1-SKX", + .flags = MWAIT2flg(0x00), + .exit_latency = 2, + .target_residency = 2, + }, + { + .name = "C1E-SKX", + .flags = MWAIT2flg(0x01), + .exit_latency = 10, + .target_residency = 20, + }, + { + .name = "C6-SKX", + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 133, + .target_residency = 600, + }, + {} +}; + static const struct cpuidle_state atom_cstates[] = { { .name = "C1E-ATM", @@ -757,6 +779,11 @@ static const struct idle_cpu idle_cpu_sk .disable_promotion_to_c1e = 1, }; +static const struct idle_cpu idle_cpu_skx = { + .state_table = skx_cstates, + .disable_promotion_to_c1e = 1, +}; + static const struct idle_cpu idle_cpu_avn = { .state_table = avn_cstates, .disable_promotion_to_c1e = 1, @@ -798,6 +825,7 @@ static const struct x86_cpu_id intel_idl ICPU(0x56, bdw), ICPU(0x4e, skl), ICPU(0x5e, skl), + ICPU(0x55, skx), ICPU(0x57, knl), {} }; --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -530,6 +530,28 @@ static struct cpuidle_state skl_cstates[ {} }; +static const struct cpuidle_state skx_cstates[] = { + { + .name = "C1-SKX", + .flags = MWAIT2flg(0x00), + .exit_latency = 2, + .target_residency = 2, + }, + { + .name = "C1E-SKX", + .flags = MWAIT2flg(0x01), + .exit_latency = 10, + .target_residency = 20, + }, + { + .name = "C6-SKX", + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 133, + .target_residency = 600, + }, + {} +}; + static const struct cpuidle_state atom_cstates[] = { { .name = "C1E-ATM", @@ -757,6 +779,11 @@ static const struct idle_cpu idle_cpu_sk .disable_promotion_to_c1e = 1, }; +static const struct idle_cpu idle_cpu_skx = { + .state_table = skx_cstates, + .disable_promotion_to_c1e = 1, +}; + static const struct idle_cpu idle_cpu_avn = { .state_table = avn_cstates, .disable_promotion_to_c1e = 1, @@ -798,6 +825,7 @@ static const struct x86_cpu_id intel_idl ICPU(0x56, bdw), ICPU(0x4e, skl), ICPU(0x5e, skl), + ICPU(0x55, skx), ICPU(0x57, knl), {} };