Skip to content

Commit

Permalink
kvm/irqchip: kvm_arch_irq_routing_update renaming split
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Roman Kagan <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Gleb Natapov <[email protected]>
CC: Paolo Bonzini <[email protected]>
CC: Roman Kagan <[email protected]>
CC: Denis V. Lunev <[email protected]>
CC: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
Andrey Smetanin authored and bonzini committed Nov 25, 2015
1 parent b2467e7 commit abdb080
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kvm/irq_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions include/linux/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
{
Expand Down
7 changes: 6 additions & 1 deletion virt/kvm/irqchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt,
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,
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit abdb080

Please sign in to comment.