| .. | .. |
|---|
| 3 | 3 | #define __KVM_IO_APIC_H |
|---|
| 4 | 4 | |
|---|
| 5 | 5 | #include <linux/kvm_host.h> |
|---|
| 6 | | - |
|---|
| 7 | 6 | #include <kvm/iodev.h> |
|---|
| 7 | +#include "irq.h" |
|---|
| 8 | 8 | |
|---|
| 9 | 9 | struct kvm; |
|---|
| 10 | 10 | struct kvm_vcpu; |
|---|
| .. | .. |
|---|
| 108 | 108 | |
|---|
| 109 | 109 | static inline int ioapic_in_kernel(struct kvm *kvm) |
|---|
| 110 | 110 | { |
|---|
| 111 | | - int mode = kvm->arch.irqchip_mode; |
|---|
| 112 | | - |
|---|
| 113 | | - /* Matches smp_wmb() when setting irqchip_mode */ |
|---|
| 114 | | - smp_rmb(); |
|---|
| 115 | | - return mode == KVM_IRQCHIP_KERNEL; |
|---|
| 111 | + return irqchip_kernel(kvm); |
|---|
| 116 | 112 | } |
|---|
| 117 | 113 | |
|---|
| 118 | 114 | void kvm_rtc_eoi_tracking_restore_one(struct kvm_vcpu *vcpu); |
|---|
| 119 | | -bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, |
|---|
| 120 | | - int short_hand, unsigned int dest, int dest_mode); |
|---|
| 121 | | -int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2); |
|---|
| 122 | 115 | void kvm_ioapic_update_eoi(struct kvm_vcpu *vcpu, int vector, |
|---|
| 123 | 116 | int trigger_mode); |
|---|
| 124 | 117 | int kvm_ioapic_init(struct kvm *kvm); |
|---|
| .. | .. |
|---|
| 126 | 119 | int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int irq_source_id, |
|---|
| 127 | 120 | int level, bool line_status); |
|---|
| 128 | 121 | void kvm_ioapic_clear_all(struct kvm_ioapic *ioapic, int irq_source_id); |
|---|
| 129 | | -int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, |
|---|
| 130 | | - struct kvm_lapic_irq *irq, |
|---|
| 131 | | - struct dest_map *dest_map); |
|---|
| 132 | 122 | void kvm_get_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state); |
|---|
| 133 | 123 | void kvm_set_ioapic(struct kvm *kvm, struct kvm_ioapic_state *state); |
|---|
| 134 | 124 | void kvm_ioapic_scan_entry(struct kvm_vcpu *vcpu, |
|---|