Received: by 10.223.176.46 with SMTP id f43csp2526298wra; Sun, 21 Jan 2018 22:16:40 -0800 (PST) X-Google-Smtp-Source: AH8x227uj2n71Y6OwMTS4r1Sl0hWAhMwq4udSDEYPritA6beV0rdOUJpse+CFaQirB7pCDPP6tWn X-Received: by 10.99.115.16 with SMTP id o16mr6477403pgc.362.1516601800503; Sun, 21 Jan 2018 22:16:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516601800; cv=none; d=google.com; s=arc-20160816; b=T4+2ecEnOqnzyFKFe9UZ+egITmqku+0MYTQ0vlfZr28XZUp9QLu0smfzb4gFD9nbhK E2HcuXtdhx1JzGFO1h+zwXPbvt6FE7dhzZCptDQAuzZlDL1vGYe3oUNViAEdL+iGkoxB vBN136zUiSQ4/c7UgwPHUCFc83V6yZ/goJFkNSY+dcdmsH+9VUv3mF4ETlNQl98ezjhg KJV+FgJs1IcE09Gg4V3VCpLuAVflk4TwvkvdENGdmiVRtvTmjsQGfUS8muOD0CHqe7rm OOA03QM9KC+2zEjXkIpTGzTBNGAszDmgRWhM4QCVOrdbtu3LDEJZiK3QjUFjZG44qgj8 P6sA== 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=Mx/UWc7V/3cH7PMPBW4hB/oOhCvaHoCIhUJ79Gz5DAE=; b=0PFOYI3VWqmopeyJcrMmbi8a6CIdeK0JhBB+U55XF7L1OMBOPclXImXMHWNpPNbtG8 mAVc/4cVCR/9m8No8UwQq3yBjijPd0TqcQM1cPL+f+6RE3LoIFiB4hdUA7rKx9FSsLyK LnBlUeMbuDp+CmYVPcTdnUrZDHh3xHybYB4TnpRk70l6Gr19l8qMc3PaW75XEyCGJKz+ Yd74NlZm5x34ULbmtdWcBgFQoagi1xq+4Ce9el8Gs3H2j+1hPD2oH6Upw7R1uGcEFUAV CEJlCg+0jWbw61qOblqgIGWBuA+60eyOj2KvHA8Stc2nIc8tOo6Zt560Tn1nTvuXdcuO 6oTw== 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 c10si3876218pga.270.2018.01.21.22.16.26; Sun, 21 Jan 2018 22:16:40 -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 S1751303AbeAVGOb (ORCPT + 99 others); Mon, 22 Jan 2018 01:14:31 -0500 Received: from thoth.sbs.de ([192.35.17.2]:57576 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751054AbeAVGNN (ORCPT ); Mon, 22 Jan 2018 01:13:13 -0500 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w0M6CwcL008101 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Jan 2018 07:12:58 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.15.170]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id w0M6Cq6m008276; Mon, 22 Jan 2018 07:12:57 +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 Subject: [PATCH 5/6] x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI Date: Mon, 22 Jan 2018 07:12:49 +0100 Message-Id: <825040fe16c7d19b7fb48ed90c5e133412d55cc3.1516601570.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 f2038417a590..77ba0eb0a258 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -2597,7 +2597,7 @@ config PCI_DIRECT config PCI_MMCONFIG bool "Support mmconfig PCI config space access" if X86_64 default y - depends on PCI && (ACPI || SFI) && (PCI_GOMMCONFIG || PCI_GOANY || X86_64) + depends on PCI && (ACPI || SFI || JAILHOUSE_GUEST) && (PCI_GOMMCONFIG || PCI_GOANY || X86_64) config PCI_OLPC def_bool y @@ -2612,6 +2612,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 aed9296dccd3..b2c9e230e2fe 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -143,6 +143,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 ea831c858195..47edf599f6fd 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -690,7 +690,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