Received: by 10.223.185.116 with SMTP id b49csp7041344wrg; Wed, 28 Feb 2018 21:44:11 -0800 (PST) X-Google-Smtp-Source: AG47ELvFZ4fi/lU1FtOflcV1OSFA/uN6Jovs8fWGTDx/AZEqDZCE1EJZG0+QCsnZz5Y9+fQ5oJZo X-Received: by 2002:a17:902:9881:: with SMTP id s1-v6mr769256plp.286.1519883051520; Wed, 28 Feb 2018 21:44:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519883051; cv=none; d=google.com; s=arc-20160816; b=ljD7wiKi1TNghSz3r51r0xUNFWWFC/GS/qMq1yWq2PUOMnKC66g3XBlwEr3UFu7lGa Xza7+PVRW3XrqIoJu1STDGZqKw0Z1K84mn6ksawBrB9Rq3hRC8XjgYHNtd0FmpYGW7/t qYsLXP30VRi84Puw2hnxz2sf/C0RvtDbgGPY8n5+nU3sB5gzPW5w05jm/FIIDNkEMESv hcAdZk1gDVyu0g19mcqVCpfi7iOq1VEkeTnh07xqV84eIA/huQIsHXXTeo7PGgsMmDbe 2P9sitS4iaWuhnLMsFllPlYC25JJ8jOo/kQsoabpx3EMjQMkR/9LlPzLSWkBGubX1m+1 bnfA== 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=SimABz/JjXFyR5ahonQm4alT69pIR3Q7TC7BAw4/OI8=; b=V6JE0PlOp3i28AqTn/tNG0mI0CjGarXc/QvzdZy+uLiJyktlzbCgC5TPFjPyePYUbC aRmC+b2Y7sG3rfi4GG/ONSRhfldoGd1VwYj5zBtJXpD+gnWpNAN+eENAtrfDeBf5TfwT jB2/7Y9Fz9bW+BIwhgohkmeJqMZHQ2evFA6TqAHamC72XKqbOwoE74kStK7CEGomodsL 8KUbHt8RsEdShtH/RmIz5aJPqx7V45kFwW9wdDtEyzlGr3jR5v+at3gWNrqzST7QLq5I DyKGof4zNqnFEp8A1m4GnMxK/U8S+NlmToOH0GIJY60wtfJ9GJ3pwmqQVLdSKYNZDYmE 2zWw== 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 d8si2433131pfb.349.2018.02.28.21.43.57; Wed, 28 Feb 2018 21:44:11 -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 S966158AbeCAFmI (ORCPT + 99 others); Thu, 1 Mar 2018 00:42:08 -0500 Received: from thoth.sbs.de ([192.35.17.2]:47581 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966071AbeCAFlK (ORCPT ); Thu, 1 Mar 2018 00:41:10 -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 w215erdj021964 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Mar 2018 06:40:53 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.33.50]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id w215eo94000453; Thu, 1 Mar 2018 06:40:53 +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 v3 5/6] x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI Date: Thu, 1 Mar 2018 06:40:48 +0100 Message-Id: <8470cbcfae9adc01f86f7d519e219f5e798d0535.1519882849.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 aef9d67ac186..b8e73e748acc 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) && (X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)) + depends on PCI && (ACPI || SFI || JAILHOUSE_GUEST) && (X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)) config PCI_OLPC def_bool y @@ -2658,6 +2658,10 @@ config PCI_DOMAINS def_bool y depends on PCI +config MMCONF_FAM10H + def_bool y + depends on 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