From 15eafc2e602ff8c37c6e132eb8c63fec8fc17175 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 17 Dec 2015 17:16:08 +0100 Subject: kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP This patch adds support for split IRQ chip mode. When KVM_CAP_SPLIT_IRQCHIP is enabled: 1.) The PIC, PIT, and IOAPIC are implemented in userspace while the LAPIC is implemented by KVM. 2.) The software IOAPIC delivers interrupts to the KVM LAPIC via kvm_set_irq. Interrupt delivery is configured via the MSI routing table, for which routes are reserved in target-i386/kvm.c then configured in hw/intc/ioapic.c 3.) KVM delivers IOAPIC EOIs via a new exit KVM_EXIT_IOAPIC_EOI, which is handled in target-i386/kvm.c and relayed to the software IOAPIC via ioapic_eoi_broadcast. Signed-off-by: Matt Gingell Signed-off-by: Paolo Bonzini --- target-i386/kvm_i386.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'target-i386/kvm_i386.h') diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h index c1b312ba2a..42b00af1b1 100644 --- a/target-i386/kvm_i386.h +++ b/target-i386/kvm_i386.h @@ -13,6 +13,8 @@ #include "sysemu/kvm.h" +#define kvm_apic_in_kernel() (kvm_irqchip_in_kernel()) + bool kvm_allows_irq0_override(void); bool kvm_has_smm(void); void kvm_synchronize_all_tsc(void); -- cgit v1.2.3