Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: x86: Rename kvm_set_msi_irq() => kvm_msi_to_lapic_irq()

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>

+7 -10
-3
arch/x86/include/asm/kvm_host.h
··· 2382 2382 bool kvm_intr_is_single_vcpu(struct kvm *kvm, struct kvm_lapic_irq *irq, 2383 2383 struct kvm_vcpu **dest_vcpu); 2384 2384 2385 - void kvm_set_msi_irq(struct kvm *kvm, struct kvm_kernel_irq_routing_entry *e, 2386 - struct kvm_lapic_irq *irq); 2387 - 2388 2385 static inline bool kvm_irq_is_postable(struct kvm_lapic_irq *irq) 2389 2386 { 2390 2387 /* We can only post Fixed and LowPrio IRQs */
+7 -7
arch/x86/kvm/irq.c
··· 252 252 return r; 253 253 } 254 254 255 - void kvm_set_msi_irq(struct kvm *kvm, struct kvm_kernel_irq_routing_entry *e, 256 - struct kvm_lapic_irq *irq) 255 + static void kvm_msi_to_lapic_irq(struct kvm *kvm, 256 + struct kvm_kernel_irq_routing_entry *e, 257 + struct kvm_lapic_irq *irq) 257 258 { 258 259 struct msi_msg msg = { .address_lo = e->msi.address_lo, 259 260 .address_hi = e->msi.address_hi, ··· 272 271 irq->level = 1; 273 272 irq->shorthand = APIC_DEST_NOSHORT; 274 273 } 275 - EXPORT_SYMBOL_GPL(kvm_set_msi_irq); 276 274 277 275 static inline bool kvm_msi_route_invalid(struct kvm *kvm, 278 276 struct kvm_kernel_irq_routing_entry *e) ··· 290 290 if (!level) 291 291 return -1; 292 292 293 - kvm_set_msi_irq(kvm, e, &irq); 293 + kvm_msi_to_lapic_irq(kvm, e, &irq); 294 294 295 295 return kvm_irq_delivery_to_apic(kvm, NULL, &irq, NULL); 296 296 } ··· 313 313 if (kvm_msi_route_invalid(kvm, e)) 314 314 return -EINVAL; 315 315 316 - kvm_set_msi_irq(kvm, e, &irq); 316 + kvm_msi_to_lapic_irq(kvm, e, &irq); 317 317 318 318 if (kvm_irq_delivery_to_apic_fast(kvm, NULL, &irq, &r, NULL)) 319 319 return r; ··· 486 486 if (entry->type != KVM_IRQ_ROUTING_MSI) 487 487 continue; 488 488 489 - kvm_set_msi_irq(vcpu->kvm, entry, &irq); 489 + kvm_msi_to_lapic_irq(vcpu->kvm, entry, &irq); 490 490 491 491 if (!irq.trig_mode) 492 492 continue; ··· 521 521 return -EINVAL; 522 522 523 523 if (entry && entry->type == KVM_IRQ_ROUTING_MSI) { 524 - kvm_set_msi_irq(kvm, entry, &irq); 524 + kvm_msi_to_lapic_irq(kvm, entry, &irq); 525 525 526 526 /* 527 527 * Force remapped mode if hardware doesn't support posting the