From patchwork Wed Aug 3 08:36:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9260921 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 AC8CF6048B for ; Wed, 3 Aug 2016 08:39:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B79A28551 for ; Wed, 3 Aug 2016 08:39:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E1A928578; Wed, 3 Aug 2016 08:39:17 +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 031F928551 for ; Wed, 3 Aug 2016 08:39:17 +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 1bUrfd-0007zz-AD; Wed, 03 Aug 2016 08:36:57 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUrfc-0007zq-0t for xen-devel@lists.xenproject.org; Wed, 03 Aug 2016 08:36:56 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id E7/66-01026-72DA1A75; Wed, 03 Aug 2016 08:36:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEIsWRWlGSWpSXmKPExsXS6fjDS1dt7cJ wg33dqhbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aKD7cZC6bLVyz6e5y9gfGjVBcjJ4eQQJ7E u+ZH7CA2r4CdxImutYwgtoSAocTT99fZQGwWAVWJW09OsoDYbALqEm3PtrN2MXJwiAgYSJw7m gRiMgvoS2xbxwJiCgtoSUzdoAhi8goISvzdIQzSxww0+8PkB4wTGLlmIWRmIclA2FoSD3/dYo GwtSWWLXzNPAtsvLTE8n8cEGF7ibd/zzKjKgGxvSTe393HuoCRYxWjenFqUVlqka6RXlJRZnp GSW5iZo6uoYGpXm5qcXFiempOYlKxXnJ+7iZGYNgxAMEOxu9/nA4xSnIwKYnyvs5cGC7El5Sf UpmRWJwRX1Sak1p8iFGGg0NJgld7DVBOsCg1PbUiLTMHGAEwaQkOHiURXofVQGne4oLE3OLMd IjUKUZFKXFeUZA+AZBERmkeXBss6i4xykoJ8zICHSLEU5BalJtZgir/ilGcg1FJmDcIZApPZl 4J3PRXQIuZgBafMFgAsrgkESEl1cDo8eo5W5iL2qE/bpEme7LfvjqWW/T+g9RNnifzJfJbEtp uNHLIqF5ZLHHgWo6S3RLzqrVFsnEiojMf+ZxMvPVNIOHfif78gMwV8X9eHd7Hxukkf81juazK xfPXaiRXWzKsFI+SlY0/tYzl6tvM2WyXDrRt6brS5PS8SUvAmXunBKunc2uIY4wSS3FGoqEWc 1FxIgDwRb2ItQIAAA== X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-4.tower-206.messagelabs.com!1470213412!52731246!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.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 37672 invoked from network); 3 Aug 2016 08:36:54 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-4.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 3 Aug 2016 08:36:54 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Wed, 03 Aug 2016 02:36:52 -0600 Message-Id: <57A1C94202000078001020EE@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.1 Date: Wed, 03 Aug 2016 02:36:50 -0600 From: "Jan Beulich" To: "xen-devel" Mime-Version: 1.0 Cc: Andrew Cooper Subject: [Xen-devel] [PATCH] mwait-idle: add Denverton 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 Denverton is an Intel Atom based micro server which shares the same Goldmont architecture as Broxton. The available C-states on Denverton is a subset of Broxton with only C1, C1e, and C6. Signed-off-by: Jacob Pan Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki [Linux commit: 0080d65b7719fc58e60b5595fc61acded330004f] Signed-off-by: Jan Beulich mwait-idle: add Denverton Denverton is an Intel Atom based micro server which shares the same Goldmont architecture as Broxton. The available C-states on Denverton is a subset of Broxton with only C1, C1e, and C6. Signed-off-by: Jacob Pan Signed-off-by: Len Brown Signed-off-by: Rafael J. Wysocki [Linux commit: 0080d65b7719fc58e60b5595fc61acded330004f] Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -658,6 +658,28 @@ static struct cpuidle_state bxt_cstates[ {} }; +static const struct cpuidle_state dnv_cstates[] = { + { + .name = "C1-DNV", + .flags = MWAIT2flg(0x00), + .exit_latency = 2, + .target_residency = 2, + }, + { + .name = "C1E-DNV", + .flags = MWAIT2flg(0x01), + .exit_latency = 10, + .target_residency = 20, + }, + { + .name = "C6-DNV", + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 50, + .target_residency = 500, + }, + {} +}; + static void mwait_idle(void) { unsigned int cpu = smp_processor_id(); @@ -844,6 +866,11 @@ static const struct idle_cpu idle_cpu_bx .disable_promotion_to_c1e = 1, }; +static const struct idle_cpu idle_cpu_dnv = { + .state_table = dnv_cstates, + .disable_promotion_to_c1e = 1, +}; + #define ICPU(model, cpu) \ { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MONITOR, \ &idle_cpu_##cpu} @@ -881,6 +908,7 @@ static const struct x86_cpu_id intel_idl ICPU(0x55, skx), ICPU(0x57, knl), ICPU(0x5c, bxt), + ICPU(0x5f, dnv), {} }; Acked-by: Andrew Cooper --- a/xen/arch/x86/cpu/mwait-idle.c +++ b/xen/arch/x86/cpu/mwait-idle.c @@ -658,6 +658,28 @@ static struct cpuidle_state bxt_cstates[ {} }; +static const struct cpuidle_state dnv_cstates[] = { + { + .name = "C1-DNV", + .flags = MWAIT2flg(0x00), + .exit_latency = 2, + .target_residency = 2, + }, + { + .name = "C1E-DNV", + .flags = MWAIT2flg(0x01), + .exit_latency = 10, + .target_residency = 20, + }, + { + .name = "C6-DNV", + .flags = MWAIT2flg(0x20) | CPUIDLE_FLAG_TLB_FLUSHED, + .exit_latency = 50, + .target_residency = 500, + }, + {} +}; + static void mwait_idle(void) { unsigned int cpu = smp_processor_id(); @@ -844,6 +866,11 @@ static const struct idle_cpu idle_cpu_bx .disable_promotion_to_c1e = 1, }; +static const struct idle_cpu idle_cpu_dnv = { + .state_table = dnv_cstates, + .disable_promotion_to_c1e = 1, +}; + #define ICPU(model, cpu) \ { X86_VENDOR_INTEL, 6, model, X86_FEATURE_MONITOR, \ &idle_cpu_##cpu} @@ -881,6 +908,7 @@ static const struct x86_cpu_id intel_idl ICPU(0x55, skx), ICPU(0x57, knl), ICPU(0x5c, bxt), + ICPU(0x5f, dnv), {} };