Received: by 10.223.164.202 with SMTP id h10csp1295065wrb; Mon, 27 Nov 2017 00:13:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMYRGvmeI5VOojWdiHl8bDJGAj5rcOWRrXA5aPbJpkhZWxikRCb9d4Cwi9QujU2LgyP9GuIm X-Received: by 10.99.181.72 with SMTP id u8mr14208494pgo.118.1511770413297; Mon, 27 Nov 2017 00:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511770413; cv=none; d=google.com; s=arc-20160816; b=g1Nd5m0oM1D9Sl+TXGCprGwzcTxLI+PQ/rfeJ4rsbTm30XHT1uLaXe1KJ/XR4DXUwv cW02ot0sheSajPEL0SrVi+YGGh5+bX1MbmRCl1wtESAUCH8mWERo6yGJhJ9s81yGBHTZ HwCc7BEA7/XkXOoWguMkhvmvjgfjqneHRBraClRNxlBD+xi5rcaxXLKbVUX1DpTjhneu chsrWQ3Vk4TgbH5U312KB47ug5j/9CxOg87WlvUJl7O0uz0mS68SJF2s/xvZCDa4ykj6 02nWxu/T+yULQtxwyzYTaEM5dqa/0YVum/XCPCYB3X65k2KTZ9bUklUHb3X2+Tbr7r6U R6Bw== 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=cX4S9JJ6P3wWiP+WIkS63X97YMNpeIbClZOAiao3XpY=; b=EWGyOzOY4SpJ+lJlvsP4B5xcKRhMZ9R1OXJmz4UPaw9dsik7R3ma3xAYKv1SztH+ye 0EogYnxG6iOi2PeMyeF1u7PY48UdWatS7pWoWhxsLJg5ZttTdVypkmzcwd5wPniWe+1s u91MfqgRyJI20MMHjHjL7hQcYKsjA7vvqrYbLgGMtqoZUDpTiivLfLdUck8vt+fW2yOd XLGUM1p/sN89DhpwUNBNoYEHjkpKirD8tc6JolyKqiQsIiOOFkHEjdCBcJNH2Qg6tdw/ DRsntlxx1LHuPGlEu9irbi3FPoJVu6vyHeTuSR2mvPcJyz1sSgk6QzdVoWQz/+QqbXmf MtoQ== 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 61si11413826plz.327.2017.11.27.00.13.21; Mon, 27 Nov 2017 00:13:33 -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 S1751544AbdK0IML (ORCPT + 78 others); Mon, 27 Nov 2017 03:12:11 -0500 Received: from goliath.siemens.de ([192.35.17.28]:58524 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751336AbdK0IMH (ORCPT ); Mon, 27 Nov 2017 03:12:07 -0500 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id vAR8Bx0A013956 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 09:11:59 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.32.153]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id vAR8BtEY021016; Mon, 27 Nov 2017 09:11:59 +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 v2 06/12] x86/jailhouse: Enable PMTIMER Date: Mon, 27 Nov 2017 09:11:48 +0100 Message-Id: <6d5c3fadd801eb3fba9510e2d3db14a9c404a1a0.1511770314.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 Reviewed-by: Thomas Gleixner --- 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 93c67ae5cfaf..bbcbe21ca664 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -800,6 +800,7 @@ config PARAVIRT_CLOCK config JAILHOUSE_GUEST bool "Jailhouse non-root cell support" depends on 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 9682e7089402..267547162a2c 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 @@ -93,6 +94,9 @@ static void __init jailhouse_init_platform(void) if (setup_data.compatible_version > JAILHOUSE_SETUP_REQUIRED_VERSION) panic("Jailhouse: Unsupported setup data structure"); + + pmtmr_ioport = setup_data.pm_timer_address; + pr_debug("Jailhouse: PM-Timer IO Port: %#x\n", pmtmr_ioport); } bool jailhouse_paravirt(void) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 46505396869e..d650c5b6ec90 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) @@ -564,3 +548,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 1598802418335229697@xxx Thu Apr 26 10:00:03 +0000 2018 X-GM-THRID: 1585131103893860787 X-Gmail-Labels: Inbox,Category Forums,Downloaded_2018-04