Patchwork [V2,14/23] kvm tools: Initialise PCI before devices start getting registered with PCI

login
register
mail settings
Submitter Matt Evans
Date Dec. 9, 2011, 6:55 a.m.
Message ID <4EE1B0CF.3080706@ozlabs.org>
Download mbox | patch
Permalink /patch/130297/
State New
Headers show

Comments

Matt Evans - Dec. 9, 2011, 6:55 a.m.
Re-arrange pci__init() in builtin-run such that it comes before devices are
initialised.

Signed-off-by: Matt Evans <matt@ozlabs.org>
---
 tools/kvm/builtin-run.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index c067685..99db522 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -828,6 +828,8 @@  int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 
 	kvm->nrcpus = nrcpus;
 
+	pci__init();
+
 	/*
 	 * vidmode should be either specified
 	 * either set by default
@@ -895,8 +897,6 @@  int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 
 	serial8250__init(kvm);
 
-	pci__init();
-
 	if (active_console == CONSOLE_VIRTIO)
 		virtio_console__init(kvm);