Received: by 10.223.185.116 with SMTP id b49csp4746121wrg; Tue, 6 Mar 2018 23:41:59 -0800 (PST) X-Google-Smtp-Source: AG47ELuquMlxDoZM+ldrRwQILx9WPBtHWDZQUGYdjX1078OT7PnTyJd06M427f6UTf7Ea6BfnynM X-Received: by 10.99.114.24 with SMTP id n24mr16609998pgc.400.1520408519653; Tue, 06 Mar 2018 23:41:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520408519; cv=none; d=google.com; s=arc-20160816; b=cwRkK+SUhDvuIICHMI7Nus+5Bwy+yXrJqHYMBUae3j0ZlTBFZ60jZtyCNvAe1bL451 EOznBBtf37qWeEEHyRIbyyLzGa7hKRbsZlKOxEQef66SyaADUiVB5rgtlbv9WA+/OJer 9zRQKNFc8ln9fw+Mf/GqL9KTEjjoLTY+2doyH1bv0bZ6R6xN0YfFELLFsMXS/BCZfOFE ueNVWFYRpHlvxP/gLJfPTjP1ZFZmFPsuOsQHNkbkVV9Stq5BW22i5ax9Vu6mCbpBCnk3 1Vugbx0VKb63nTLEFo/6ahBghNlaZC5EXE6sx7zaWJ0QEj6tOqgZ1d15vaDmMa5bkyH9 gSIA== 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=8yqdRKWD9TG/5u8RbS/UxNOkKCJi7DUhanVYTNkOCo4=; b=EOo3n9NGGd3R8aqWHuyfpfALfHZT5adVmAo2n+6A2ET9pKmNpTRkB9+h7+fXghCOVT gxnlroeY92D+JruRZ873BLicwVy0KIokPnIUYdcsA4GMLZDebJ27/klzdY/+MNpH4R7/ Vvp/B3hKe7qTZLh8EiPAp3fH03JgysM22wOusBo2lKDw5l5hApQu6vPwFWWzXz/WBenA 8fc9oD1BTAFGLUwl2vgi1r+Gmn0csNy1iAlG7reNcouUl50pud2hWzzZPX81Bht4/eYh JwCeTmZkRWo5Nktf2rdixFsa+U2firf6PdjZGcp4wp2Y9Nzn3ZnCYj+G+80u9KcMrl3H NihA== 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 s187si11019534pgc.47.2018.03.06.23.41.45; Tue, 06 Mar 2018 23:41:59 -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 S1751325AbeCGHkY (ORCPT + 99 others); Wed, 7 Mar 2018 02:40:24 -0500 Received: from thoth.sbs.de ([192.35.17.2]:49540 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751141AbeCGHjj (ORCPT ); Wed, 7 Mar 2018 02:39:39 -0500 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w277dN5F001850 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Mar 2018 08:39:23 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.11.133]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w277dIAm004697; Wed, 7 Mar 2018 08:39:22 +0100 From: Jan Kiszka To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Bjorn Helgaas Cc: x86@kernel.org, Linux Kernel Mailing List , jailhouse-dev@googlegroups.com, linux-pci@vger.kernel.org, virtualization@lists.linux-foundation.org, Andy Shevchenko Subject: [PATCH v5 6/7] x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI Date: Wed, 7 Mar 2018 08:39:17 +0100 Message-Id: <788bbd5325d1922235e9562c213057425fbc548c.1520408357.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.13.6 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 does not use ACPI, but it does support MMCONFIG. Make sure the latter can be built without having to enable ACPI as well. Primarily, we need to make the AMD mmconf-fam10h_64 depend upon MMCONFIG and ACPI, instead of just the former. Saves some bytes in the Jailhouse non-root kernel. Signed-off-by: Jan Kiszka --- arch/x86/Kconfig | 6 +++++- arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/cpu/amd.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 8986a6b6e3df..b53340e71f84 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2643,7 +2643,7 @@ config PCI_DIRECT config PCI_MMCONFIG bool "Support mmconfig PCI config space access" if X86_64 default y - depends on PCI && (ACPI || SFI) + depends on PCI && (ACPI || SFI || JAILHOUSE_GUEST) depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG) config PCI_OLPC @@ -2659,6 +2659,10 @@ config PCI_DOMAINS def_bool y depends on PCI +config MMCONF_FAM10H + def_bool y + depends on X86_64 && PCI_MMCONFIG && ACPI + config PCI_CNB20LE_QUIRK bool "Read CNB20LE Host Bridge Windows" if EXPERT depends on PCI diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 29786c87e864..73ccf80c09a2 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -146,6 +146,6 @@ ifeq ($(CONFIG_X86_64),y) obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o - obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o + obj-$(CONFIG_MMCONF_FAM10H) += mmconf-fam10h_64.o obj-y += vsmp_64.o endif diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index f0e6456ca7d3..12bc0a1139da 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -716,7 +716,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c) static void init_amd_gh(struct cpuinfo_x86 *c) { -#ifdef CONFIG_X86_64 +#ifdef CONFIG_MMCONF_FAM10H /* do this for boot cpu */ if (c == &boot_cpu_data) check_enable_amd_mmconf_dmi(); -- 2.13.6