diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-10-15 11:49:47 +0200 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2012-01-19 12:14:42 +0100 |
commit | 84b058d7df1e75543ef7422d97b039cd413f68f1 (patch) | |
tree | d5b8cee422b48439013608482a997df03f29430a /kvm.h | |
parent | 1660e72d4fbbd87e34eb4017d7e7c0ff4e29ca84 (diff) |
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 'kvm.h')
-rw-r--r-- | kvm.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -51,6 +51,7 @@ int kvm_has_debugregs(void); int kvm_has_xsave(void); int kvm_has_xcrs(void); int kvm_has_many_ioeventfds(void); +int kvm_has_gsi_routing(void); #ifdef NEED_CPU_H int kvm_init_vcpu(CPUState *env); @@ -124,6 +125,13 @@ void kvm_arch_reset_vcpu(CPUState *env); int kvm_arch_on_sigbus_vcpu(CPUState *env, int code, void *addr); int kvm_arch_on_sigbus(int code, void *addr); +void kvm_arch_init_irq_routing(KVMState *s); + +int kvm_irqchip_set_irq(KVMState *s, int irq, int level); + +void kvm_irqchip_add_route(KVMState *s, int gsi, int irqchip, int pin); +int kvm_irqchip_commit_routes(KVMState *s); + struct kvm_guest_debug; struct kvm_debug_exit_arch; |