[PATCH 20/28] kvm tools: Init IRQs after determining nrcpus

Matt Evans
2011-12-06T03:41:50Z

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(-)

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index 576dcfa..84aa931 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -810,8 +810,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();
@@ -829,6 +827,8 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)

kvm->nrcpus = nrcpus;

+ irq__init(kvm);
+
pci__init();

/*