Received: by 10.223.164.202 with SMTP id h10csp1295856wrb; Mon, 27 Nov 2017 00:14:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMYrzeL9OH2657BKQKCxrZ3XMpM6X1Wu9Av4TLeQgYfuMIOey9EjY/g7mc6oQ7MxjUEjlJaZ X-Received: by 10.84.139.1 with SMTP id 1mr37896202plq.20.1511770468274; Mon, 27 Nov 2017 00:14:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511770468; cv=none; d=google.com; s=arc-20160816; b=lLtQEClYhfbYHuyrfsKNkUNKbY25Q9klLV4HJdPGvDsFEpEA1KnNhwrZbkpkW1bnQd a+VESeErZoU4HQfHQ/Ddukr9qjTUUoPsA502uQPy0DI0M4vCeTZXaPuNVyh7PDYNDWI/ 6sQfuxd9+X04AGPAXhYnUSqCaf4i9swUp5BnC7KXL+VL7w5NidkB5Y+JvIfNIVkDFs3E Ffb/se8NLGZJMldHi+Ex9igRe3zvy0F/33XlLxk/mBykSNxgkhORRaVEQW+V6Hf3Bt80 xNp1XdKAV06tbjrM7WFTVor6d9NbPRjNEfVa4p0O3sD1n/SprQ0YeXvM+nmUTDvkFXbf y86A== 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=C6NdHOLYXez0dmtuuCqmb/Ep1hM4Qs7X5yHS3kO1QfM=; b=UcYa6GlBq8Lr9kb5pWkXTG3doQNMuqZG34vv5qtQuGba3PXMprpsErH6cw7fYQbqHt wbgpANtgwKUnQSWbZfklxs9QuDSD+Z8DMBDyNf4r1JJoSBa15SHvRBD1+aymw+i9h06i BtfxxwiOjx7YZD3jil6m9/0EKDCTaSKvP6pu44ZhACWIMGS0CRc2wISkN4inA+RH7T9a 7pK/ilj27hnqNDoiSfmlL6Vc0DANtcI8g0zv8WVk6jhyFeRmMZ7PLyKJNLTGvdgnXv8n fY4PXfpBihtP5YnsG/lq8P/FvB21B4NmF4uWIP9XrXC1yi5OMXHqh/yob3OKt1s3eT2C Tm/g== 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 o3si21423684plk.45.2017.11.27.00.14.16; Mon, 27 Nov 2017 00:14:28 -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 S1751822AbdK0INN (ORCPT + 78 others); Mon, 27 Nov 2017 03:13:13 -0500 Received: from goliath.siemens.de ([192.35.17.28]:58575 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751482AbdK0IMK (ORCPT ); Mon, 27 Nov 2017 03:12:10 -0500 Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id vAR8C2RO014193 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 27 Nov 2017 09:12:02 +0100 Received: from md1f2u6c.ww002.siemens.net ([167.87.32.153]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id vAR8BtEe021016; Mon, 27 Nov 2017 09:12:02 +0100 From: Jan Kiszka To: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, Linux Kernel Mailing List , jailhouse-dev@googlegroups.com Subject: [PATCH v2 12/12] x86/jailhouse: Initialize PCI support Date: Mon, 27 Nov 2017 09:11:54 +0100 Message-Id: X-Mailer: git-send-email 2.12.3 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 With this change, PCI devices can be detected and used inside a non-root cell. Signed-off-by: Jan Kiszka --- arch/x86/kernel/jailhouse.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/x86/kernel/jailhouse.c b/arch/x86/kernel/jailhouse.c index 8ff21e1534de..70b857d4b1f5 100644 --- a/arch/x86/kernel/jailhouse.c +++ b/arch/x86/kernel/jailhouse.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -108,6 +109,19 @@ static void jailhouse_no_restart(void) machine_halt(); } +static int __init jailhouse_pci_arch_init(void) +{ + pci_direct_init(1); + + /* + * There are no bridges on the virtual PCI root bus under Jailhouse, + * thus no other way to discover all devices than a full scan. + */ + pcibios_last_bus = 0xff; + + return 0; +} + static void __init jailhouse_init_platform(void) { u64 pa_data = boot_params.hdr.setup_data; @@ -117,6 +131,7 @@ static void __init jailhouse_init_platform(void) x86_init.irqs.pre_vector_init = x86_init_noop; x86_init.timers.timer_init = jailhouse_timer_init; x86_init.mpparse.get_smp_config = jailhouse_get_smp_config; + x86_init.pci.arch_init = jailhouse_pci_arch_init; x86_platform.calibrate_cpu = jailhouse_get_tsc; x86_platform.calibrate_tsc = jailhouse_get_tsc; @@ -159,6 +174,8 @@ static void __init jailhouse_init_platform(void) precalibrated_tsc_khz = setup_data.tsc_khz; + pci_probe = 0; + /* * Avoid that the kernel complains about missing ACPI tables - there * are none in a non-root cell. -- 2.12.3 From 1586015025922156460@xxx Wed Dec 06 06:29:55 +0000 2017 X-GM-THRID: 1583334148445829702 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread