diff options
author | Robert Mustacchi <rm@joyent.com> | 2011-06-08 17:03:05 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2011-06-08 17:03:05 -0700 |
commit | 92f8225b1255e8d3f8f53fdf81d8f0b64e84a9ef (patch) | |
tree | ef1bc590332051b202049a9eb5cb9f22b15c3d9b | |
parent | 675edd4a59fbb4fe065082b3abd039d250640cbd (diff) | |
download | illumos-kvm-92f8225b1255e8d3f8f53fdf81d8f0b64e84a9ef.tar.gz |
HVM-343 Always run code in CONFIG_X86
-rw-r--r-- | kvm_ioapic.c | 3 | ||||
-rw-r--r-- | kvm_irq_comm.c | 11 |
2 files changed, 1 insertions, 13 deletions
diff --git a/kvm_ioapic.c b/kvm_ioapic.c index a47458c..05a5323 100644 --- a/kvm_ioapic.c +++ b/kvm_ioapic.c @@ -182,7 +182,6 @@ ioapic_deliver(struct kvm_ioapic *ioapic, int irq) irqe.level = 1; irqe.shorthand = 0; -#ifdef CONFIG_X86 /* Always delivery PIT interrupt to vcpu 0 */ if (irq == 0) { irqe.dest_mode = 0; /* Physical mode. */ @@ -192,7 +191,7 @@ ioapic_deliver(struct kvm_ioapic *ioapic, int irq) */ irqe.dest_id = ioapic->kvm->bsp_vcpu->vcpu_id; } -#endif + return (kvm_irq_delivery_to_apic(ioapic->kvm, NULL, &irqe)); } diff --git a/kvm_irq_comm.c b/kvm_irq_comm.c index be35c8a..3f46de5 100644 --- a/kvm_irq_comm.c +++ b/kvm_irq_comm.c @@ -46,14 +46,10 @@ static int kvm_set_pic_irq(struct kvm_kernel_irq_routing_entry *e, struct kvm *kvm, int irq_source_id, int level) { -#ifdef CONFIG_X86 struct kvm_pic *pic = pic_irqchip(kvm); level = kvm_irq_line_state(&pic->irq_states[e->irqchip.pin], irq_source_id, level); return (kvm_pic_set_irq(pic, e->irqchip.pin, level)); -#else - return (-1); -#endif } static int @@ -282,9 +278,7 @@ kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id) clear_bit(irq_source_id, &kvm->arch.vioapic->irq_states[i]); if (i >= 16) continue; -#ifdef CONFIG_X86 clear_bit(irq_source_id, &pic_irqchip(kvm)->irq_states[i]); -#endif } unlock: mutex_exit(&kvm->irq_lock); @@ -489,7 +483,6 @@ out: #define ROUTING_ENTRY1(irq) IOAPIC_ROUTING_ENTRY(irq) -#ifdef CONFIG_X86 #define PIC_ROUTING_ENTRY(irq) \ { \ .gsi = irq, \ @@ -500,10 +493,6 @@ out: #define ROUTING_ENTRY2(irq) \ IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq) -#else -#define ROUTING_ENTRY2(irq) \ - IOAPIC_ROUTING_ENTRY(irq) -#endif static const struct kvm_irq_routing_entry default_routing[] = { ROUTING_ENTRY2(0), ROUTING_ENTRY2(1), |