From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426476AbeCBK21 (ORCPT ); Fri, 2 Mar 2018 05:28:27 -0500 Received: from thoth.sbs.de ([192.35.17.2]:42489 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426319AbeCBK2L (ORCPT ); Fri, 2 Mar 2018 05:28:11 -0500 Subject: Re: [PATCH v3 3/6] x86/jailhouse: Enable PCI mmconfig access in inmates To: Andy Shevchenko Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Bjorn Helgaas , x86@kernel.org, Linux Kernel Mailing List , jailhouse-dev@googlegroups.com, linux-pci@vger.kernel.org, virtualization@lists.linux-foundation.org References: <188edc11aa5fa11d4915097831a2a4a153f6ed83.1519882849.git.jan.kiszka@siemens.com> From: Jan Kiszka Message-ID: Date: Fri, 2 Mar 2018 11:27:47 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-03-01 11:31, Andy Shevchenko wrote: > On Thu, Mar 1, 2018 at 7:40 AM, Jan Kiszka wrote: > >> Use the PCI mmconfig base address exported by jailhouse in boot >> parameters in order to access the memory mapped PCI configuration space. > > >> --- a/arch/x86/kernel/jailhouse.c >> +++ b/arch/x86/kernel/jailhouse.c >> @@ -124,6 +124,13 @@ 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, 0xff, setup_data.pci_mmconfig_base); > > Hmm... Shouldn't be pcibios_last_bus instead of 0xff? > Indeed. Thanks, Jan >> + pci_mmcfg_arch_init(); >> + } >> +#endif > -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux