From patchwork Tue Jul 7 06:38:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 6730211 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E7E1BC05AC for ; Tue, 7 Jul 2015 06:39:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2280A206E0 for ; Tue, 7 Jul 2015 06:39:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3AEC3206E9 for ; Tue, 7 Jul 2015 06:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754341AbbGGGj1 (ORCPT ); Tue, 7 Jul 2015 02:39:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36335 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752722AbbGGGjU (ORCPT ); Tue, 7 Jul 2015 02:39:20 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 51796359992; Tue, 7 Jul 2015 06:39:20 +0000 (UTC) Received: from nilsson.home.kraxel.org (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t676dJo6016678; Tue, 7 Jul 2015 02:39:19 -0400 Received: by nilsson.home.kraxel.org (Postfix, from userid 500) id C5A33818F4; Tue, 7 Jul 2015 08:39:17 +0200 (CEST) From: Gerd Hoffmann To: seabios@seabios.org Cc: kvm@vger.kernel.org, Gerd Hoffmann Subject: [PATCH 4/7] kvmtool: detect pci devices Date: Tue, 7 Jul 2015 08:38:43 +0200 Message-Id: <1436251126-24580-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1436251126-24580-1-git-send-email-kraxel@redhat.com> References: <1436251126-24580-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make a pci bus scan, so we find the virtio devices. Tested with virtio-blk only (kvmtool uses that by default). Signed-off-by: Gerd Hoffmann --- src/fw/paravirt.c | 9 +++++++++ src/fw/paravirt.h | 1 + src/post.c | 1 + 3 files changed, 11 insertions(+) diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index efd9848..28d47d2 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -457,3 +457,12 @@ kvmtool_preinit(void) RamSize = 128 * 1024 * 1024; add_e820(0, RamSize, E820_RAM); } + +void +kvmtool_platform_setup(void) +{ + if (!CONFIG_KVMTOOL) + return; + + pci_probe_devices(); +} diff --git a/src/fw/paravirt.h b/src/fw/paravirt.h index 7caca4d..3078af6 100644 --- a/src/fw/paravirt.h +++ b/src/fw/paravirt.h @@ -35,5 +35,6 @@ void qemu_platform_setup(void); void qemu_cfg_init(void); void kvmtool_preinit(void); +void kvmtool_platform_setup(void); #endif diff --git a/src/post.c b/src/post.c index 36cc5d7..f6b8b8e 100644 --- a/src/post.c +++ b/src/post.c @@ -173,6 +173,7 @@ platform_hardware_setup(void) // Platform specific setup qemu_platform_setup(); + kvmtool_platform_setup(); coreboot_platform_setup(); // Initialize TPM