Patchwork [V2,16/23] kvm tools: Init IRQs after determining nrcpus

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

Comments

Matt Evans - Dec. 9, 2011, 6:55 a.m.
IRQ init may involve per-CPU setup/allocation of resources, so make sure
kvm->nrcpus is initialised before calling irq__init().

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 7491428..7969901 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -809,8 +809,6 @@  int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 
 	kvm = kvm__init(dev, ram_size, guest_name);
 
-	irq__init(kvm);
-
 	kvm->single_step = single_step;
 
 	ioeventfd__init();
@@ -828,6 +826,8 @@  int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 
 	kvm->nrcpus = nrcpus;
 
+	irq__init(kvm);
+
 	pci__init();
 
 	/*