Received: by 10.223.164.202 with SMTP id h10csp1676419wrb; Thu, 16 Nov 2017 02:20:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMZXO83pPeQvhtGGwoMeIcLyK9c5N8qt9y/5wCQW970CcO8cXL40Km2jZphaTYoel/227zSW X-Received: by 10.98.71.144 with SMTP id p16mr1295975pfi.15.1510827635674; Thu, 16 Nov 2017 02:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510827635; cv=none; d=google.com; s=arc-20160816; b=b8PVXe5t5b008fW7taxy32JxK4wGwqPDETUhkatpg4O7mqABUjDDFb45jt+Qca2b/S IAPgSKTJcfqGNHMlZqr1vClsLloMrYc4pQ4i9iFaEhL63rYLUm65jS49CH0rRg1Agn6x Z0zNVKUIek42dR5bWuqf/L6ZepJSePfy8w8B25/3aCctNys3Osox7mAd0S1/kSYEq63M T07VTQQMBIyI/ILx75pwmTgBiWXgCMwqUfN/UNfXrt+hs8SfdaZ18NfXgVa7KS37hS3Z q2TXBsJ2Rk3OaXEpCC/7sN66Qo3/U8KBxZ3D/Pcfm7LlesrFMEY+/8hSx4Lg8c5uYTIQ A+Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5du2IDn23fBadv56EWEwLj4EMOkgzpqDe2n4O3WdaVU=; b=GWeWB+ZpK50MuvP7IAMjhyPQ83r6rpFcwQuopQXuqXQ+dAXjGUnkMRcUKVbazneSRn 5o/+1EYVHX6o+COCf2jF3qprrmWp78nQRZoM+GO2c5wuUckvQPy/j7Fq1hP50wZevJIM rgn7Y5FSastWvW7NXDCOZTGNrNmoQuBEOZbJ2+jnCDCuxJ04oocAN+o0S9oKrTjzadZQ 9xosWeuqQSKyYio+ChsOxkuzZaACvNGyxc6aVvADc96p0ZcliBOOlsbBwwbKIdWIqkH5 G/08dAjTOcjoETH4uQXizlgAZH3b04sS8y9iAmrgJGoMdi8uV12gjx2kjWoxh2Of9ELZ 5mlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si618343pgs.719.2017.11.16.02.20.20; Thu, 16 Nov 2017 02:20:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933574AbdKPHsj (ORCPT + 91 others); Thu, 16 Nov 2017 02:48:39 -0500 Received: from goliath.siemens.de ([192.35.17.28]:60479 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758551AbdKPHrs (ORCPT ); Thu, 16 Nov 2017 02:47:48 -0500 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id vAG7QtDj008220 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Nov 2017 08:26:55 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.32.158]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id vAG7QrlT029336; Thu, 16 Nov 2017 08:26:54 +0100 From: Jan Kiszka To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, Linux Kernel Mailing List , jailhouse-dev@googlegroups.com Subject: [PATCH 04/10] x86: jailhouse: Enable PMTIMER Date: Thu, 16 Nov 2017 08:26:46 +0100 Message-Id: <903f5eedb46e55da7479ed541112acae25d64240.1510817211.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jan Kiszka Jailhouse exposes the PMTIMER as only reference clock to all cells. Pick up its address from the setup data. Allow to enable the Linux support of it by relaxing its strict dependency on ACPI. Signed-off-by: Jan Kiszka --- arch/x86/Kconfig | 1 + arch/x86/kernel/jailhouse.c | 4 ++++ drivers/acpi/Kconfig | 32 ++++++++++++++++---------------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c5f4f4683b51..6976c035ea63 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -785,6 +785,7 @@ config KVM_DEBUG_FS config JAILHOUSE_GUEST bool "Jailhouse non-root cell support" depends on PARAVIRT && X86_64 + select X86_PM_TIMER ---help--- This option allows to run Linux as guest in a Jailhouse non-root cell. You can leave this option disabled if you only want to start diff --git a/arch/x86/kernel/jailhouse.c b/arch/x86/kernel/jailhouse.c index ce9416c70656..f7e99f7a8873 100644 --- a/arch/x86/kernel/jailhouse.c +++ b/arch/x86/kernel/jailhouse.c @@ -10,6 +10,7 @@ * the COPYING file in the top-level directory. */ +#include #include #include #include @@ -66,6 +67,9 @@ static void __init jailhouse_init_platform(void) data->compatible_version > SETUP_REQUIRED_VERSION) panic("Jailhouse: Unsupported setup data structure"); + pmtmr_ioport = data->pm_timer_address; + pr_debug("Jailhouse: PM-Timer IO Port: %#x\n", pmtmr_ioport); + #ifdef CONFIG_X86_X2APIC /* * Register x2APIC handlers early. We need them when running diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 91477d5ab422..c054f9b4f1eb 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -361,22 +361,6 @@ config ACPI_PCI_SLOT i.e., segment/bus/device/function tuples, with physical slots in the system. If you are unsure, say N. -config X86_PM_TIMER - bool "Power Management Timer Support" if EXPERT - depends on X86 - default y - help - The Power Management Timer is available on all ACPI-capable, - in most cases even if ACPI is unusable or blacklisted. - - This timing source is not affected by power management features - like aggressive processor idling, throttling, frequency and/or - voltage scaling, unlike the commonly used Time Stamp Counter - (TSC) timing source. - - You should nearly always say Y here because many modern - systems require this timer. - config ACPI_CONTAINER bool "Container and Module Devices" default (ACPI_HOTPLUG_MEMORY || ACPI_HOTPLUG_CPU) @@ -558,3 +542,19 @@ config TPS68470_PMIC_OPREGION using this, are probed. endif # ACPI + +config X86_PM_TIMER + bool "Power Management Timer Support" if EXPERT + depends on X86 && (ACPI || JAILHOUSE_GUEST) + default y + help + The Power Management Timer is available on all ACPI-capable, + in most cases even if ACPI is unusable or blacklisted. + + This timing source is not affected by power management features + like aggressive processor idling, throttling, frequency and/or + voltage scaling, unlike the commonly used Time Stamp Counter + (TSC) timing source. + + You should nearly always say Y here because many modern + systems require this timer. -- 2.12.3 From 1584244991736406773@xxx Thu Nov 16 17:35:59 +0000 2017 X-GM-THRID: 1584176828413681691 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread