Received: by 10.223.185.116 with SMTP id b49csp7258244wrg; Thu, 1 Mar 2018 02:32:33 -0800 (PST) X-Google-Smtp-Source: AG47ELsOhVd7cfKEKogvPoKA8hVQW3xJSjaEFXLkxwgMoDgahHg0+IlhxfPvFWV8bJnlKWPYEDO0 X-Received: by 2002:a17:902:26a:: with SMTP id 97-v6mr1497632plc.3.1519900353608; Thu, 01 Mar 2018 02:32:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519900353; cv=none; d=google.com; s=arc-20160816; b=rWoSwtui87LalCZoUcyuFeMEUDGg+wtOmH1KYoKzx4YaqF2ovGhPasGEH50dPicszE mRpPdJ/XYVU/4gX2nLoPzEk6a1OCLXd8+qAMdLc+4+ui8Vo3ph4utgKWqG/EJ+e3L9lO ruGjPaW0a+y46vYl9/UmcuVxTJmjs6aV6LqkuQGrHepJsOlM5vIB5x6nv84oY2sAPrh/ eoco/pcxhtt76Dcjbr5HvYhHi2Bb0SjJDyGFT8iPomQOUr0XH4QxS8UFKHMXny9Mz8g+ a5EwvqDNZ4HbX15hdArmOktTKtrWefePCOC9+rfNn5w8qgXChNLLZQCHtWpXJ0nVGDoE bEyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=VfsbBTRvg4/Yb8oI3IJMgTvWcGOTt/yV/g1f/SDk2lQ=; b=tjbOMMSxgylCQGA2Eufnh7Q7sDyZEVwJd2gpbY9MZAFljsWJl3zuKk6So3OnyRua01 OSvV+zj5lvdY+acIw5F6165AM8m1EFXEazxs05DIjsdNlLArqHQqSA1R4D3CFHDH5gfU f23zL+chisj72lUdlgPkcitSg4/p5zv6WPoUxoJRYdttuCVMB1Y2hbF0ARAblU6rmc70 DqZMk1uiSiGgzxn/ot73AJNJM/nA+PPu5Dsp6FVCZyejX+KEW5owpxuKP5tRBr4HCNO6 9iLnLEIbwWoad+xcnU4A9W5hFI7TPDo+P6DxtVsWqwGx7UWuUpbtRVA4cQEv1rKA2+xv qH/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DnlNjoRd; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si512511pgf.326.2018.03.01.02.32.18; Thu, 01 Mar 2018 02:32:33 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DnlNjoRd; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966395AbeCAKbN (ORCPT + 99 others); Thu, 1 Mar 2018 05:31:13 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:42515 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935832AbeCAKbJ (ORCPT ); Thu, 1 Mar 2018 05:31:09 -0500 Received: by mail-qt0-f195.google.com with SMTP id t6so6850226qtn.9; Thu, 01 Mar 2018 02:31:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VfsbBTRvg4/Yb8oI3IJMgTvWcGOTt/yV/g1f/SDk2lQ=; b=DnlNjoRdHAYHvbi9YsBxdOUIywzT2t26Tn3wGKvl6FVAOgsCaQmrApYB9YiLhY++1B 7GCZ9Jkh6T5qTKs9VfDQqqEsLfcxl1eH2sX3bRnI1Sc9Um87+VHNgm5fr7c/ALyCUwo9 ApcekCzitM51mjKA26Kea31sbB0RhVTl+FZFyUbve+Qc5L/L4dn/3qggkiSMzId9zkDM CAUTEnUNSQAsXU2pv/ltCLKGoPTGGyyroBD+UblIJxHLtT2e7vo+HRMQ2WcmqgOBLXvK ML2U6d9zzh1X4f6dYNBjxLw5EUfouDYCC4wkFDzDhpeo8vCaET09s0/3O0w1VMxwCsOE Xrog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VfsbBTRvg4/Yb8oI3IJMgTvWcGOTt/yV/g1f/SDk2lQ=; b=oQuFhyNUl7e6U0UeBqRSJ49V0jmXD1NMfNWxmdssqKqV5PvFQAEQQ/1OeJm8xUi+lL 4n52Rbfai5w0FK/Qg93bRLlJ48fl7qvlxdw4suG3xglxx2sCnNaxqsqGEDrF4Yp/mOoP 1b3MJ6JEamhI7OKg1j3XXlzJdV5CM/kx7DNHbfGtq98sbTnu9M+z7+ULFH5xolzejWrD eDFDIoOQLTQo9dKaRw1tqSgjkkW3Mjdx7P1p3q/5FmbbewIYVGyPhVzxmBVxZt93umit vBqRXwnWrww69VXPpneqXHda73GF3rxYkLqBMk8PSSwLgddw1I7uUi8ruNYHMA6n26Eb mmEw== X-Gm-Message-State: AElRT7H3fXZoEHypB9qO87QucDuA0o5/dd0tNgIiDnUYRbDasnFtDQg4 HWpGtgbfdwa4PUgN1fGqoC6AbUPYm9x9qSbBLxg= X-Received: by 10.200.54.213 with SMTP id b21mr2149452qtc.187.1519900269173; Thu, 01 Mar 2018 02:31:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.195.80 with HTTP; Thu, 1 Mar 2018 02:31:08 -0800 (PST) In-Reply-To: <188edc11aa5fa11d4915097831a2a4a153f6ed83.1519882849.git.jan.kiszka@siemens.com> References: <188edc11aa5fa11d4915097831a2a4a153f6ed83.1519882849.git.jan.kiszka@siemens.com> From: Andy Shevchenko Date: Thu, 1 Mar 2018 12:31:08 +0200 Message-ID: Subject: Re: [PATCH v3 3/6] x86/jailhouse: Enable PCI mmconfig access in inmates To: Jan Kiszka 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > + pci_mmcfg_arch_init(); > + } > +#endif -- With Best Regards, Andy Shevchenko