]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: x86: Rename kvm_set_msi_irq() => kvm_msi_to_lapic_irq()
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:46:05 +0000 (15:46 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 23 Jun 2025 16:50:53 +0000 (09:50 -0700)
Rename kvm_set_msi_irq() to kvm_msi_to_lapic_irq() to better capture what
it actually does, e.g. it's _really_ easy to conflate kvm_set_msi_irq()
with kvm_set_msi().

Opportunistically delete the public declaration and export, as they are
no longer used/needed.

No functional change intended.

Link: https://lore.kernel.org/r/20250611224604.313496-64-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/irq.c

index 9a5d8e35f43170af01e21b61ada56bd3c1a5fd51..8a8efe9f23fbc298f2a36028cb29f2dcb1d77628 100644 (file)
@@ -2382,9 +2382,6 @@ bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu);
 bool kvm_intr_is_single_vcpu(struct kvm *kvm, struct kvm_lapic_irq *irq,
                             struct kvm_vcpu **dest_vcpu);
 
-void kvm_set_msi_irq(struct kvm *kvm, struct kvm_kernel_irq_routing_entry *e,
-                    struct kvm_lapic_irq *irq);
-
 static inline bool kvm_irq_is_postable(struct kvm_lapic_irq *irq)
 {
        /* We can only post Fixed and LowPrio IRQs */
index 3e8ee23b16c226757239e3c02fc4f71069c5cd37..4c3f80e8b13fc5606905906300f320c70a785ebc 100644 (file)
@@ -252,8 +252,9 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
        return r;
 }
 
-void kvm_set_msi_irq(struct kvm *kvm, struct kvm_kernel_irq_routing_entry *e,
-                    struct kvm_lapic_irq *irq)
+static void kvm_msi_to_lapic_irq(struct kvm *kvm,
+                                struct kvm_kernel_irq_routing_entry *e,
+                                struct kvm_lapic_irq *irq)
 {
        struct msi_msg msg = { .address_lo = e->msi.address_lo,
                               .address_hi = e->msi.address_hi,
@@ -271,7 +272,6 @@ void kvm_set_msi_irq(struct kvm *kvm, struct kvm_kernel_irq_routing_entry *e,
        irq->level = 1;
        irq->shorthand = APIC_DEST_NOSHORT;
 }
-EXPORT_SYMBOL_GPL(kvm_set_msi_irq);
 
 static inline bool kvm_msi_route_invalid(struct kvm *kvm,
                struct kvm_kernel_irq_routing_entry *e)
@@ -290,7 +290,7 @@ int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e,
        if (!level)
                return -1;
 
-       kvm_set_msi_irq(kvm, e, &irq);
+       kvm_msi_to_lapic_irq(kvm, e, &irq);
 
        return kvm_irq_delivery_to_apic(kvm, NULL, &irq, NULL);
 }
@@ -313,7 +313,7 @@ int kvm_arch_set_irq_inatomic(struct kvm_kernel_irq_routing_entry *e,
                if (kvm_msi_route_invalid(kvm, e))
                        return -EINVAL;
 
-               kvm_set_msi_irq(kvm, e, &irq);
+               kvm_msi_to_lapic_irq(kvm, e, &irq);
 
                if (kvm_irq_delivery_to_apic_fast(kvm, NULL, &irq, &r, NULL))
                        return r;
@@ -486,7 +486,7 @@ void kvm_scan_ioapic_routes(struct kvm_vcpu *vcpu,
                        if (entry->type != KVM_IRQ_ROUTING_MSI)
                                continue;
 
-                       kvm_set_msi_irq(vcpu->kvm, entry, &irq);
+                       kvm_msi_to_lapic_irq(vcpu->kvm, entry, &irq);
 
                        if (!irq.trig_mode)
                                continue;
@@ -521,7 +521,7 @@ static int kvm_pi_update_irte(struct kvm_kernel_irqfd *irqfd,
                return -EINVAL;
 
        if (entry && entry->type == KVM_IRQ_ROUTING_MSI) {
-               kvm_set_msi_irq(kvm, entry, &irq);
+               kvm_msi_to_lapic_irq(kvm, entry, &irq);
 
                /*
                 * Force remapped mode if hardware doesn't support posting the