kvm/irqchip: kvm_arch_irq_routing_update renaming split
authorAndrey Smetanin <asmetanin@virtuozzo.com>
Tue, 10 Nov 2015 12:36:31 +0000 (15:36 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 Nov 2015 16:24:21 +0000 (17:24 +0100)
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>
arch/x86/kvm/irq_comm.c
include/linux/kvm_host.h
virt/kvm/irqchip.c

index 84b96d319909414fd3aba1e7b7888486843f86b8..e39768ca8285e42a147317cb4151b05807c4f3b9 100644 (file)
@@ -332,7 +332,7 @@ int kvm_setup_empty_irq_routing(struct kvm *kvm)
        return kvm_set_irq_routing(kvm, empty_routing, 0, 0);
 }
 
-void kvm_arch_irq_routing_update(struct kvm *kvm)
+void kvm_arch_post_irq_routing_update(struct kvm *kvm)
 {
        if (ioapic_in_kernel(kvm) || !irqchip_in_kernel(kvm))
                return;
index c923350ca20a5a53453576f360e52498de232abe..23555c0f4f2ded45c6a26b0b2710e6d7a2af0c34 100644 (file)
@@ -484,12 +484,12 @@ void vcpu_put(struct kvm_vcpu *vcpu);
 
 #ifdef __KVM_HAVE_IOAPIC
 void kvm_vcpu_request_scan_ioapic(struct kvm *kvm);
-void kvm_arch_irq_routing_update(struct kvm *kvm);
+void kvm_arch_post_irq_routing_update(struct kvm *kvm);
 #else
 static inline void kvm_vcpu_request_scan_ioapic(struct kvm *kvm)
 {
 }
-static inline void kvm_arch_irq_routing_update(struct kvm *kvm)
+static inline void kvm_arch_post_irq_routing_update(struct kvm *kvm)
 {
 }
 #endif
@@ -1091,6 +1091,7 @@ static inline void kvm_irq_routing_update(struct kvm *kvm)
 {
 }
 #endif
+void kvm_arch_irq_routing_update(struct kvm *kvm);
 
 static inline int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args)
 {
index f0b08a2a48ba3ff2486dc84180c709d0deacfe55..fe84e1a95dd55ed1ba346d19666c3fcf26261cc5 100644 (file)
@@ -166,6 +166,10 @@ out:
        return r;
 }
 
+void __attribute__((weak)) kvm_arch_irq_routing_update(struct kvm *kvm)
+{
+}
+
 int kvm_set_irq_routing(struct kvm *kvm,
                        const struct kvm_irq_routing_entry *ue,
                        unsigned nr,
@@ -219,9 +223,10 @@ int kvm_set_irq_routing(struct kvm *kvm,
        old = kvm->irq_routing;
        rcu_assign_pointer(kvm->irq_routing, new);
        kvm_irq_routing_update(kvm);
+       kvm_arch_irq_routing_update(kvm);
        mutex_unlock(&kvm->irq_lock);
 
-       kvm_arch_irq_routing_update(kvm);
+       kvm_arch_post_irq_routing_update(kvm);
 
        synchronize_srcu_expedited(&kvm->irq_srcu);