Probably no one uses disable-kvm for x86_64. Also move 3 kvm-i386 function declarations from sysemu/kvm.h => target-i386/kvm_i386.h - kvm_pc_gsi_handler() - kvm_pc_setup_irq_routing() - kvm_i8259_init()
Signed-off-by: Xuebing Wang <xbi...@gmail.com> --- hw/i386/kvm/i8259.c | 2 +- hw/i386/kvm/ioapic.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 2 +- include/hw/i386/pc.h | 1 - include/sysemu/kvm.h | 2 -- target-i386/kvm_i386.h | 6 ++++++ 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/i386/kvm/i8259.c b/hw/i386/kvm/i8259.c index 53e3ca8..3ec717e 100644 --- a/hw/i386/kvm/i8259.c +++ b/hw/i386/kvm/i8259.c @@ -11,7 +11,7 @@ */ #include "hw/isa/i8259_internal.h" #include "hw/i386/apic_internal.h" -#include "sysemu/kvm.h" +#include "kvm_i386.h" #define TYPE_KVM_I8259 "kvm-i8259" #define KVM_PIC_CLASS(class) \ diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index d2a6c4c..4837d25 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -13,7 +13,7 @@ #include "hw/i386/pc.h" #include "hw/i386/ioapic_internal.h" #include "hw/i386/apic_internal.h" -#include "sysemu/kvm.h" +#include "kvm_i386.h" /* PC Utility function */ void kvm_pc_setup_irq_routing(bool pci_enabled) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d5dc1ef..a71f2e8 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -35,7 +35,7 @@ #include "net/net.h" #include "hw/boards.h" #include "hw/ide.h" -#include "sysemu/kvm.h" +#include "kvm_i386.h" #include "hw/kvm/clock.h" #include "sysemu/sysemu.h" #include "hw/sysbus.h" diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index a7f6260..3c5fb01 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -34,7 +34,7 @@ #include "hw/boards.h" #include "hw/timer/mc146818rtc.h" #include "hw/xen/xen.h" -#include "sysemu/kvm.h" +#include "kvm_i386.h" #include "hw/kvm/clock.h" #include "hw/pci-host/q35.h" #include "exec/address-spaces.h" diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 9010246..ff8cf57 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -72,7 +72,6 @@ bool parallel_mm_init(MemoryRegion *address_space, extern DeviceState *isa_pic; qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq); -qemu_irq *kvm_i8259_init(ISABus *bus); int pic_read_irq(DeviceState *d); int pic_get_output(DeviceState *d); void pic_info(Monitor *mon, const QDict *qdict); diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 60e95d8..2bf29fc 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -322,8 +322,6 @@ void kvm_irqchip_release_virq(KVMState *s, int virq); int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, EventNotifier *rn, int virq); int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq); -void kvm_pc_gsi_handler(void *opaque, int n, int level); -void kvm_pc_setup_irq_routing(bool pci_enabled); void kvm_init_irq_routing(KVMState *s); /** diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h index 202b811..e2ffbde 100644 --- a/target-i386/kvm_i386.h +++ b/target-i386/kvm_i386.h @@ -51,9 +51,15 @@ int kvm_device_msix_assign(KVMState *s, uint32_t dev_id); int kvm_device_msix_deassign(KVMState *s, uint32_t dev_id); #if defined(CONFIG_KVM) +void kvm_pc_gsi_handler(void *opaque, int n, int level); +void kvm_pc_setup_irq_routing(bool pci_enabled); +qemu_irq *kvm_i8259_init(ISABus *bus); uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, uint32_t index, int reg); #else +static inline void kvm_pc_gsi_handler(void *opaque, int n, int level) {} +static inline void kvm_pc_setup_irq_routing(bool pci_enabled) {} +static inline qemu_irq *kvm_i8259_init(ISABus *bus) {return NULL;} static inline uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function, uint32_t index, int reg) { -- 1.7.9.5