diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-07-26 15:35:14 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-09 16:16:56 +0300 |
commit | cc7e0ddf5a2307015eacfac2ac6a6a765898fcc3 (patch) | |
tree | 9f48e5a70cd18a95d2810c983b3fecba05ae75b3 /target-i386 | |
parent | 1d31f66bbc886af56d2def349012a358dc3ada06 (diff) |
kvm: Decouple 'irqfds usable' from 'kernel irqchip'
Instead of assuming that we can use irqfds if and only if
kvm_irqchip_in_kernel(), add a bool to the KVMState which
indicates this, and is set only on x86 and only if the
irqchip is in the kernel.
The kernel documentation implies that the only thing
you need to use KVM_IRQFD is that KVM_CAP_IRQFD is
advertised, but this seems to be untrue. In particular
the kernel does not (alas) return a sensible error if you
try to set up an irqfd when you haven't created an irqchip.
If it did we could remove all this nonsense and let the
kernel return the error code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index e5decf7fc6..8c28fca4b6 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -2047,4 +2047,8 @@ void kvm_arch_init_irq_routing(KVMState *s) */ no_hpet = 1; } + /* We know at this point that we're using the in-kernel + * irqchip, so we can use irqfds. + */ + kvm_irqfds_allowed = true; } |