From b91be965864259de712f7bc75c819e4bb6df269d Mon Sep 17 00:00:00 2001 From: Matt Evans Date: Fri, 9 Dec 2011 17:55:11 +1100 Subject: [PATCH] kvm tools: Initialise PCI before devices start getting registered with PCI Re-arrange pci__init() in builtin-run such that it comes before devices are initialised. Signed-off-by: Matt Evans Signed-off-by: Pekka Enberg --- builtin-run.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin-run.c b/builtin-run.c index c067685..99db522 100644 --- a/builtin-run.c +++ b/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);