diff options
author | Feng Wu <feng.wu@intel.com> | 2015-09-18 10:29:49 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-10-01 09:06:50 -0400 |
commit | d84f1e0755ba1e87d20d1f90c1e6eb0cbbc0af9d (patch) | |
tree | 0897f896cfce8e116fc90daa18484cddbcfb15aa | |
parent | 8feb4a04dc756002f78df0026e58118669de4851 (diff) |
KVM: make kvm_set_msi_irq() public
Make kvm_set_msi_irq() public, we can use this function outside.
Signed-off-by: Feng Wu <feng.wu@intel.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 4 | ||||
-rw-r--r-- | arch/x86/kvm/irq_comm.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index ba4e5673e604..79fffbbe2348 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h | |||
@@ -176,6 +176,8 @@ enum { | |||
176 | */ | 176 | */ |
177 | #define KVM_APIC_PV_EOI_PENDING 1 | 177 | #define KVM_APIC_PV_EOI_PENDING 1 |
178 | 178 | ||
179 | struct kvm_kernel_irq_routing_entry; | ||
180 | |||
179 | /* | 181 | /* |
180 | * We don't want allocation failures within the mmu code, so we preallocate | 182 | * We don't want allocation failures within the mmu code, so we preallocate |
181 | * enough memory for a single page fault in a cache. | 183 | * enough memory for a single page fault in a cache. |
@@ -1244,4 +1246,6 @@ bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu); | |||
1244 | bool kvm_intr_is_single_vcpu(struct kvm *kvm, struct kvm_lapic_irq *irq, | 1246 | bool kvm_intr_is_single_vcpu(struct kvm *kvm, struct kvm_lapic_irq *irq, |
1245 | struct kvm_vcpu **dest_vcpu); | 1247 | struct kvm_vcpu **dest_vcpu); |
1246 | 1248 | ||
1249 | void kvm_set_msi_irq(struct kvm_kernel_irq_routing_entry *e, | ||
1250 | struct kvm_lapic_irq *irq); | ||
1247 | #endif /* _ASM_X86_KVM_HOST_H */ | 1251 | #endif /* _ASM_X86_KVM_HOST_H */ |
diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c index 39f833f8132e..c89228980230 100644 --- a/arch/x86/kvm/irq_comm.c +++ b/arch/x86/kvm/irq_comm.c | |||
@@ -91,8 +91,8 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src, | |||
91 | return r; | 91 | return r; |
92 | } | 92 | } |
93 | 93 | ||
94 | static inline void kvm_set_msi_irq(struct kvm_kernel_irq_routing_entry *e, | 94 | void kvm_set_msi_irq(struct kvm_kernel_irq_routing_entry *e, |
95 | struct kvm_lapic_irq *irq) | 95 | struct kvm_lapic_irq *irq) |
96 | { | 96 | { |
97 | trace_kvm_msi_set_irq(e->msi.address_lo, e->msi.data); | 97 | trace_kvm_msi_set_irq(e->msi.address_lo, e->msi.data); |
98 | 98 | ||
@@ -108,6 +108,7 @@ static inline void kvm_set_msi_irq(struct kvm_kernel_irq_routing_entry *e, | |||
108 | irq->level = 1; | 108 | irq->level = 1; |
109 | irq->shorthand = 0; | 109 | irq->shorthand = 0; |
110 | } | 110 | } |
111 | EXPORT_SYMBOL_GPL(kvm_set_msi_irq); | ||
111 | 112 | ||
112 | int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e, | 113 | int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e, |
113 | struct kvm *kvm, int irq_source_id, int level, bool line_status) | 114 | struct kvm *kvm, int irq_source_id, int level, bool line_status) |