x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI

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, its
required 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 <jan.kiszka@siemens.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: jailhouse-dev@googlegroups.com
Cc: linux-pci@vger.kernel.org
Cc: virtualization@lists.linux-foundation.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lkml.kernel.org/r/788bbd5325d1922235e9562c213057425fbc548c.1520408357.git.jan.kiszka@siemens.com
This commit is contained in:
Jan Kiszka 2018-03-07 08:39:17 +01:00 committed by Thomas Gleixner
parent b45c9f3656
commit 8364e1f837
3 changed files with 7 additions and 3 deletions

View File

@ -2642,7 +2642,7 @@ config PCI_DIRECT
config PCI_MMCONFIG config PCI_MMCONFIG
bool "Support mmconfig PCI config space access" if X86_64 bool "Support mmconfig PCI config space access" if X86_64
default y default y
depends on PCI && (ACPI || SFI) depends on PCI && (ACPI || SFI || JAILHOUSE_GUEST)
depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG) depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)
config PCI_OLPC config PCI_OLPC
@ -2658,6 +2658,10 @@ config PCI_DOMAINS
def_bool y def_bool y
depends on PCI depends on PCI
config MMCONF_FAM10H
def_bool y
depends on X86_64 && PCI_MMCONFIG && ACPI
config PCI_CNB20LE_QUIRK config PCI_CNB20LE_QUIRK
bool "Read CNB20LE Host Bridge Windows" if EXPERT bool "Read CNB20LE Host Bridge Windows" if EXPERT
depends on PCI depends on PCI

View File

@ -146,6 +146,6 @@ ifeq ($(CONFIG_X86_64),y)
obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o
obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_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 obj-y += vsmp_64.o
endif endif

View File

@ -716,7 +716,7 @@ static void init_amd_k8(struct cpuinfo_x86 *c)
static void init_amd_gh(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 */ /* do this for boot cpu */
if (c == &boot_cpu_data) if (c == &boot_cpu_data)
check_enable_amd_mmconf_dmi(); check_enable_amd_mmconf_dmi();