diff options
author | Jan Kiszka | 2011-10-15 11:49:47 +0200 |
---|---|---|
committer | Jan Kiszka | 2012-01-19 12:14:42 +0100 |
commit | 84b058d7df1e75543ef7422d97b039cd413f68f1 (patch) | |
tree | d5b8cee422b48439013608482a997df03f29430a /target-i386 | |
parent | memory: Introduce memory_region_init_reservation (diff) | |
download | qemu-84b058d7df1e75543ef7422d97b039cd413f68f1.tar.gz qemu-84b058d7df1e75543ef7422d97b039cd413f68f1.tar.xz qemu-84b058d7df1e75543ef7422d97b039cd413f68f1.zip |
kvm: Introduce core services for in-kernel irqchip support
Add the basic infrastructure to active in-kernel irqchip support, inject
interrupts into these models, and maintain IRQ routes.
Routing is optional and depends on the host arch supporting
KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as
we can't route GSI0 to IOAPIC pin 2.
In-kernel irqchip support will once be controlled by the machine
property 'kernel_irqchip', but this is not yet wired up.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 1f56492cd2..f6f4189f4d 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1939,3 +1939,14 @@ bool kvm_arch_stop_on_emulation_error(CPUState *env) return !(env->cr[0] & CR0_PE_MASK) || ((env->segs[R_CS].selector & 3) != 3); } + +void kvm_arch_init_irq_routing(KVMState *s) +{ + if (!kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) { + /* If kernel can't do irq routing, interrupt source + * override 0->2 cannot be set up as required by HPET. + * So we have to disable it. + */ + no_hpet = 1; + } +} |