aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-09-02 15:45:30 +0100
committerPeter Maydell <peter.maydell@linaro.org>2012-09-02 15:45:30 +0100
commit86e77686e913200918d70323e847fe9ab9eedc3f (patch)
tree712fcac2b11b671fe0e17241a4b17ba08802ab85
parente7eee62a90c671d22d50964b7de05e3f4fd96f5f (diff)
downloadqemu-arm-86e77686e913200918d70323e847fe9ab9eedc3f.tar.gz
kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
Move the init of the irqchip_inject_ioctl field of KVMState out of kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq() can be used even when no irqchip is created (for architectures that support async interrupt notification even without an in kernel irqchip). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--kvm-all.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 34b02c1fba..72d84a28e5 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1200,10 +1200,6 @@ static int kvm_irqchip_create(KVMState *s)
return ret;
}
- s->irqchip_inject_ioctl = KVM_IRQ_LINE;
- if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
- s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
- }
kvm_kernel_irqchip = true;
/* If we have an in-kernel IRQ chip then we must have asynchronous
* interrupt delivery (though the reverse is not necessarily true)
@@ -1350,6 +1346,11 @@ int kvm_init(void)
s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0);
#endif
+ s->irqchip_inject_ioctl = KVM_IRQ_LINE;
+ if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
+ s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
+ }
+
ret = kvm_arch_init(s);
if (ret < 0) {
goto err;