KVM: pass struct kvm to kvm_set_routing_entry
authorRadim Krčmář <rkrcmar@redhat.com>
Tue, 12 Jul 2016 20:09:26 +0000 (22:09 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Jul 2016 07:03:56 +0000 (09:03 +0200)
Arch-specific code will use it.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/powerpc/kvm/mpic.c
arch/s390/kvm/interrupt.c
arch/x86/kvm/irq_comm.c
include/linux/kvm_host.h
virt/kvm/irqchip.c

index 6249cdc834d14977ffe5344a4b15857de01abe79..ed38f811411847d659e1810c9e5a94c583369df6 100644 (file)
@@ -1823,7 +1823,8 @@ int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e,
        return 0;
 }
 
-int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+int kvm_set_routing_entry(struct kvm *kvm,
+                         struct kvm_kernel_irq_routing_entry *e,
                          const struct kvm_irq_routing_entry *ue)
 {
        int r = -EINVAL;
index ca19627779db09756beeb18afe59ee60d8f64ac8..24524c0f3ef88b2987c7bc1d54d924e811428286 100644 (file)
@@ -2246,7 +2246,8 @@ static int set_adapter_int(struct kvm_kernel_irq_routing_entry *e,
        return ret;
 }
 
-int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+int kvm_set_routing_entry(struct kvm *kvm,
+                         struct kvm_kernel_irq_routing_entry *e,
                          const struct kvm_irq_routing_entry *ue)
 {
        int ret;
index 47ad681a33fdfd33bd8c8180b63411e082b2dc8d..889563d50c55a57e9f832c7131e215c97a65f8a4 100644 (file)
@@ -248,7 +248,8 @@ static int kvm_hv_set_sint(struct kvm_kernel_irq_routing_entry *e,
        return kvm_hv_synic_set_irq(kvm, e->hv_sint.vcpu, e->hv_sint.sint);
 }
 
-int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+int kvm_set_routing_entry(struct kvm *kvm,
+                         struct kvm_kernel_irq_routing_entry *e,
                          const struct kvm_irq_routing_entry *ue)
 {
        int r = -EINVAL;
index 66b2f6159aadd312afd263811a2b7bf9efdd861f..60d339faa94c4d571667127db7fd06192537d4f6 100644 (file)
@@ -1011,7 +1011,8 @@ int kvm_set_irq_routing(struct kvm *kvm,
                        const struct kvm_irq_routing_entry *entries,
                        unsigned nr,
                        unsigned flags);
-int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e,
+int kvm_set_routing_entry(struct kvm *kvm,
+                         struct kvm_kernel_irq_routing_entry *e,
                          const struct kvm_irq_routing_entry *ue);
 void kvm_free_irq_routing(struct kvm *kvm);
 
index 8db197bb6c7a92d6508c66cd6a4cf3b9afc84562..df99e9c3b64d314dfee121b6bf6a753be10aeb9b 100644 (file)
@@ -135,7 +135,8 @@ void kvm_free_irq_routing(struct kvm *kvm)
        free_irq_routing_table(rt);
 }
 
-static int setup_routing_entry(struct kvm_irq_routing_table *rt,
+static int setup_routing_entry(struct kvm *kvm,
+                              struct kvm_irq_routing_table *rt,
                               struct kvm_kernel_irq_routing_entry *e,
                               const struct kvm_irq_routing_entry *ue)
 {
@@ -154,7 +155,7 @@ static int setup_routing_entry(struct kvm_irq_routing_table *rt,
 
        e->gsi = ue->gsi;
        e->type = ue->type;
-       r = kvm_set_routing_entry(e, ue);
+       r = kvm_set_routing_entry(kvm, e, ue);
        if (r)
                goto out;
        if (e->type == KVM_IRQ_ROUTING_IRQCHIP)
@@ -211,7 +212,7 @@ int kvm_set_irq_routing(struct kvm *kvm,
                        kfree(e);
                        goto out;
                }
-               r = setup_routing_entry(new, e, ue);
+               r = setup_routing_entry(kvm, new, e, ue);
                if (r) {
                        kfree(e);
                        goto out;