summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/jailhouse.c
diff options
context:
space:
mode:
authorOtavio Pontes <otavio.pontes@intel.com>2018-03-07 10:39:14 +0300
committerThomas Gleixner <tglx@linutronix.de>2018-03-08 14:30:38 +0300
commit6fa4a94e150be25d02547d51f03b4bc34aaec32f (patch)
treee9e750709d73b4d2ade5e9bc4fb53e4cfcc4a8c1 /arch/x86/kernel/jailhouse.c
parent690f4304104f37e473bd5e43fc5247f5cd35b225 (diff)
downloadlinux-6fa4a94e150be25d02547d51f03b4bc34aaec32f.tar.xz
x86/jailhouse: Enable PCI mmconfig access in inmates
Use the PCI mmconfig base address exported by jailhouse in boot parameters in order to access the memory mapped PCI configuration space. [Jan: rebased, fixed !CONFIG_PCI_MMCONFIG, used pcibios_last_bus] Signed-off-by: Otavio Pontes <otavio.pontes@intel.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: jailhouse-dev@googlegroups.com Cc: linux-pci@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Bjorn Helgaas <bhelgaas@google.com> Link: https://lkml.kernel.org/r/2ee9e4401fa22377b3965893a558120f169be82b.1520408357.git.jan.kiszka@siemens.com
Diffstat (limited to 'arch/x86/kernel/jailhouse.c')
-rw-r--r--arch/x86/kernel/jailhouse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kernel/jailhouse.c b/arch/x86/kernel/jailhouse.c
index b68fd895235a..fa183a131edc 100644
--- a/arch/x86/kernel/jailhouse.c
+++ b/arch/x86/kernel/jailhouse.c
@@ -124,6 +124,14 @@ static int __init jailhouse_pci_arch_init(void)
if (pcibios_last_bus < 0)
pcibios_last_bus = 0xff;
+#ifdef CONFIG_PCI_MMCONFIG
+ if (setup_data.pci_mmconfig_base) {
+ pci_mmconfig_add(0, 0, pcibios_last_bus,
+ setup_data.pci_mmconfig_base);
+ pci_mmcfg_arch_init();
+ }
+#endif
+
return 0;
}