diff options
author | Andrey Smetanin <asmetanin@virtuozzo.com> | 2015-11-10 07:36:31 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-11-25 11:24:21 -0500 |
commit | abdb080f7ac8a85547f5e0246362790043bbd3f2 (patch) | |
tree | f9ba4a377a05fdc84c386cdeb0c0fd3783eba590 | |
parent | b2467e744f89fcb2e723143c2b78bcbaf391828a (diff) |
kvm/irqchip: kvm_arch_irq_routing_update renaming split
Actually kvm_arch_irq_routing_update() should be
kvm_arch_post_irq_routing_update() as it's called at the end
of irq routing update.
This renaming frees kvm_arch_irq_routing_update function name.
kvm_arch_irq_routing_update() weak function which will be used
to update mappings for arch-specific irq routing entries
(in particular, the upcoming Hyper-V synthetic interrupts).
Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/irq_comm.c | 2 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 5 | ||||
-rw-r--r-- | virt/kvm/irqchip.c | 7 |
3 files changed, 10 insertions, 4 deletions
diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c index 84b96d319909..e39768ca8285 100644 --- a/arch/x86/kvm/irq_comm.c +++ b/arch/x86/kvm/irq_comm.c | |||
@@ -332,7 +332,7 @@ int kvm_setup_empty_irq_routing(struct kvm *kvm) | |||
332 | return kvm_set_irq_routing(kvm, empty_routing, 0, 0); | 332 | return kvm_set_irq_routing(kvm, empty_routing, 0, 0); |
333 | } | 333 | } |
334 | 334 | ||
335 | void kvm_arch_irq_routing_update(struct kvm *kvm) | 335 | void kvm_arch_post_irq_routing_update(struct kvm *kvm) |
336 | { | 336 | { |
337 | if (ioapic_in_kernel(kvm) || !irqchip_in_kernel(kvm)) | 337 | if (ioapic_in_kernel(kvm) || !irqchip_in_kernel(kvm)) |
338 | return; | 338 | return; |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index c923350ca20a..23555c0f4f2d 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -484,12 +484,12 @@ void vcpu_put(struct kvm_vcpu *vcpu); | |||
484 | 484 | ||
485 | #ifdef __KVM_HAVE_IOAPIC | 485 | #ifdef __KVM_HAVE_IOAPIC |
486 | void kvm_vcpu_request_scan_ioapic(struct kvm *kvm); | 486 | void kvm_vcpu_request_scan_ioapic(struct kvm *kvm); |
487 | void kvm_arch_irq_routing_update(struct kvm *kvm); | 487 | void kvm_arch_post_irq_routing_update(struct kvm *kvm); |
488 | #else | 488 | #else |
489 | static inline void kvm_vcpu_request_scan_ioapic(struct kvm *kvm) | 489 | static inline void kvm_vcpu_request_scan_ioapic(struct kvm *kvm) |
490 | { | 490 | { |
491 | } | 491 | } |
492 | static inline void kvm_arch_irq_routing_update(struct kvm *kvm) | 492 | static inline void kvm_arch_post_irq_routing_update(struct kvm *kvm) |
493 | { | 493 | { |
494 | } | 494 | } |
495 | #endif | 495 | #endif |
@@ -1091,6 +1091,7 @@ static inline void kvm_irq_routing_update(struct kvm *kvm) | |||
1091 | { | 1091 | { |
1092 | } | 1092 | } |
1093 | #endif | 1093 | #endif |
1094 | void kvm_arch_irq_routing_update(struct kvm *kvm); | ||
1094 | 1095 | ||
1095 | static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) | 1096 | static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args) |
1096 | { | 1097 | { |
diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c index f0b08a2a48ba..fe84e1a95dd5 100644 --- a/virt/kvm/irqchip.c +++ b/virt/kvm/irqchip.c | |||
@@ -166,6 +166,10 @@ out: | |||
166 | return r; | 166 | return r; |
167 | } | 167 | } |
168 | 168 | ||
169 | void __attribute__((weak)) kvm_arch_irq_routing_update(struct kvm *kvm) | ||
170 | { | ||
171 | } | ||
172 | |||
169 | int kvm_set_irq_routing(struct kvm *kvm, | 173 | int kvm_set_irq_routing(struct kvm *kvm, |
170 | const struct kvm_irq_routing_entry *ue, | 174 | const struct kvm_irq_routing_entry *ue, |
171 | unsigned nr, | 175 | unsigned nr, |
@@ -219,9 +223,10 @@ int kvm_set_irq_routing(struct kvm *kvm, | |||
219 | old = kvm->irq_routing; | 223 | old = kvm->irq_routing; |
220 | rcu_assign_pointer(kvm->irq_routing, new); | 224 | rcu_assign_pointer(kvm->irq_routing, new); |
221 | kvm_irq_routing_update(kvm); | 225 | kvm_irq_routing_update(kvm); |
226 | kvm_arch_irq_routing_update(kvm); | ||
222 | mutex_unlock(&kvm->irq_lock); | 227 | mutex_unlock(&kvm->irq_lock); |
223 | 228 | ||
224 | kvm_arch_irq_routing_update(kvm); | 229 | kvm_arch_post_irq_routing_update(kvm); |
225 | 230 | ||
226 | synchronize_srcu_expedited(&kvm->irq_srcu); | 231 | synchronize_srcu_expedited(&kvm->irq_srcu); |
227 | 232 | ||