Received: by 10.223.185.116 with SMTP id b49csp8714748wrg; Fri, 2 Mar 2018 06:47:07 -0800 (PST) X-Google-Smtp-Source: AG47ELtM61Ae6LXkPQbVNBUD41tOP/FRA+4FqPc8MTnnz3KfyVPghNURWHu2vrAgKkBQFwzrG3Xe X-Received: by 10.99.160.17 with SMTP id r17mr4765499pge.127.1520002027774; Fri, 02 Mar 2018 06:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520002027; cv=none; d=google.com; s=arc-20160816; b=wom15slLVFASk7lNpd4syMABoCCl67LaZR6+DQwSqELDUSFHH5UOJDQoluFp7wk9Z/ Zilr8AVHh4SjGDFguTDicE2BOVXSYfc79I6RQab7/vEdvEvDRPZ4zdw9Mrzhqp2ZT2z4 JL/mZ45l4hemhNiT06SITDQ5ZzcgXSyBP4PgFFEyaG6h55+e9DXjOqsMxoIYRtpBfN8C G5GlCVMzgaefRyn2blfRV4uFXfvDU3IbeGthXrpu1eWJ5QAp/RPhXYmnBBxcbgWFJmRA fBX4voyfZY4rBVNq1BYTTupHP1/JRdyFvwZX2FhmwpeABvz6nF28f7+fRwG9PiX6ohzc 2fwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=a849upI/oOLUbvnzCEl6H4cB9GDjd5SdkxuIC2DdEFo=; b=cXjdwLOSLFhPSldoa3/YhsK+dpthe2pzgYD6FNtKZfpu4lkNDux7vzGB28a7x0+WHu Z3J/YfIfnr3kncYGk0LNWJrikCHny93cJFp3vX424hYKEe2uGRPgW1UXSKRn79oOxae3 8FByebKwrBWVCJZc3R338hXXEMSpOwjCp6qLbSWnFGJBFo56BTpa+O8W6KpVgr7uC26k 3CAnfcrS2umXD4OmL7iuFsGK1VAqm7Q6A5IebT4fDSC/jQ7gR0HILKTUwVURLfBWDlwh hdTi2tKiVrktgul7q3D6tBzXGNeyVgJhuZDqUUlq05uSHWVit0V1yOLxkIIDjHiGA3FO zlUA== 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 y16-v6si3436920plr.424.2018.03.02.06.46.52; Fri, 02 Mar 2018 06:47:07 -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 S1426473AbeCBK21 (ORCPT + 99 others); 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 Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w22ARpxK022292 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Mar 2018 11:27:52 +0100 Received: from [167.87.111.19] ([167.87.111.19]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w22ARlPn028949; Fri, 2 Mar 2018 11:27:48 +0100 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 Precedence: bulk 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