diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-06-05 21:03:57 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-06-06 11:41:33 +0300 |
commit | d3d3bef0a03adfe73216d741d355bb12f6e52b33 (patch) | |
tree | db542ef3879faea8954c63a056407c00bf5cb7f0 /kvm-all.c | |
parent | 8cc9b43f7c5f826b39af4b012ad89bb55faac29c (diff) | |
download | qemu-d3d3bef0a03adfe73216d741d355bb12f6e52b33.zip qemu-d3d3bef0a03adfe73216d741d355bb12f6e52b33.tar.gz qemu-d3d3bef0a03adfe73216d741d355bb12f6e52b33.tar.bz2 |
kvm: Fix build for non-CAP_IRQ_ROUTING targets
A type definition and a KVMState field initialization escaped the
required wrapping with KVM_CAP_IRQ_ROUTING. Also, we need to provide a
dummy kvm_irqchip_release_virq as virtio-pci references (but does not
use) it.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Acked-by: Ben Collins <bcollins@ubuntu.com>
Tested-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -62,11 +62,6 @@ typedef struct KVMSlot typedef struct kvm_dirty_log KVMDirtyLog; -typedef struct KVMMSIRoute { - struct kvm_irq_routing_entry kroute; - QTAILQ_ENTRY(KVMMSIRoute) entry; -} KVMMSIRoute; - struct KVMState { KVMSlot slots[32]; @@ -867,6 +862,11 @@ int kvm_irqchip_set_irq(KVMState *s, int irq, int level) } #ifdef KVM_CAP_IRQ_ROUTING +typedef struct KVMMSIRoute { + struct kvm_irq_routing_entry kroute; + QTAILQ_ENTRY(KVMMSIRoute) entry; +} KVMMSIRoute; + static void set_gsi(KVMState *s, unsigned int gsi) { s->used_gsi_bitmap[gsi / 32] |= 1U << (gsi % 32); @@ -1129,6 +1129,10 @@ static void kvm_init_irq_routing(KVMState *s) { } +void kvm_irqchip_release_virq(KVMState *s, int virq) +{ +} + int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg) { abort(); @@ -1286,7 +1290,9 @@ int kvm_init(void) s->pit_state2 = kvm_check_extension(s, KVM_CAP_PIT_STATE2); #endif +#ifdef KVM_CAP_IRQ_ROUTING s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0); +#endif ret = kvm_arch_init(s); if (ret < 0) { |