aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/lapic.c2
-rw-r--r--virt/kvm/ioapic.c12
-rw-r--r--virt/kvm/ioapic.h3
3 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index e2274745ab3d..3e22536a7031 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -739,7 +739,7 @@ static void kvm_ioapic_send_eoi(struct kvm_lapic *apic, int vector)
739 trigger_mode = IOAPIC_LEVEL_TRIG; 739 trigger_mode = IOAPIC_LEVEL_TRIG;
740 else 740 else
741 trigger_mode = IOAPIC_EDGE_TRIG; 741 trigger_mode = IOAPIC_EDGE_TRIG;
742 kvm_ioapic_update_eoi(apic->vcpu->kvm, vector, trigger_mode); 742 kvm_ioapic_update_eoi(apic->vcpu, vector, trigger_mode);
743 } 743 }
744} 744}
745 745
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 914cbe027d06..1d8906d39214 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -264,8 +264,8 @@ void kvm_ioapic_clear_all(struct kvm_ioapic *ioapic, int irq_source_id)
264 spin_unlock(&ioapic->lock); 264 spin_unlock(&ioapic->lock);
265} 265}
266 266
267static void __kvm_ioapic_update_eoi(struct kvm_ioapic *ioapic, int vector, 267static void __kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu,
268 int trigger_mode) 268 struct kvm_ioapic *ioapic, int vector, int trigger_mode)
269{ 269{
270 int i; 270 int i;
271 271
@@ -304,12 +304,12 @@ bool kvm_ioapic_handles_vector(struct kvm *kvm, int vector)
304 return test_bit(vector, ioapic->handled_vectors); 304 return test_bit(vector, ioapic->handled_vectors);
305} 305}
306 306
307void kvm_ioapic_update_eoi(struct kvm *kvm, int vector, int trigger_mode) 307void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector, int trigger_mode)
308{ 308{
309 struct kvm_ioapic *ioapic = kvm->arch.vioapic; 309 struct kvm_ioapic *ioapic = vcpu->kvm->arch.vioapic;
310 310
311 spin_lock(&ioapic->lock); 311 spin_lock(&ioapic->lock);
312 __kvm_ioapic_update_eoi(ioapic, vector, trigger_mode); 312 __kvm_ioapic_update_eoi(vcpu, ioapic, vector, trigger_mode);
313 spin_unlock(&ioapic->lock); 313 spin_unlock(&ioapic->lock);
314} 314}
315 315
@@ -407,7 +407,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
407 break; 407 break;
408#ifdef CONFIG_IA64 408#ifdef CONFIG_IA64
409 case IOAPIC_REG_EOI: 409 case IOAPIC_REG_EOI:
410 __kvm_ioapic_update_eoi(ioapic, data, IOAPIC_LEVEL_TRIG); 410 __kvm_ioapic_update_eoi(NULL, ioapic, data, IOAPIC_LEVEL_TRIG);
411 break; 411 break;
412#endif 412#endif
413 413
diff --git a/virt/kvm/ioapic.h b/virt/kvm/ioapic.h
index 0400a466c50c..2fc61a5013d2 100644
--- a/virt/kvm/ioapic.h
+++ b/virt/kvm/ioapic.h
@@ -70,7 +70,8 @@ static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
70int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, 70int kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source,
71 int short_hand, int dest, int dest_mode); 71 int short_hand, int dest, int dest_mode);
72int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2); 72int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2);
73void kvm_ioapic_update_eoi(struct kvm *kvm, int vector, int trigger_mode); 73void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector,
74 int trigger_mode);
74bool kvm_ioapic_handles_vector(struct kvm *kvm, int vector); 75bool kvm_ioapic_handles_vector(struct kvm *kvm, int vector);
75int kvm_ioapic_init(struct kvm *kvm); 76int kvm_ioapic_init(struct kvm *kvm);
76void kvm_ioapic_destroy(struct kvm *kvm); 77void kvm_ioapic_destroy(struct kvm *kvm);