From 84b058d7df1e75543ef7422d97b039cd413f68f1 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 15 Oct 2011 11:49:47 +0200 Subject: 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 --- kvm.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kvm.h') diff --git a/kvm.h b/kvm.h index c1de81a..dd2d4f0 100644 --- a/kvm.h +++ b/kvm.h @@ -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; -- cgit v1.1