Re: [PATCH v2 1/3] KVM: X86: Some cleanups in ioapic.h/lapic.h

From: Peter Xu
Date: Mon Dec 02 2019 - 14:13:50 EST


On Mon, Dec 02, 2019 at 09:47:41AM -0800, Sean Christopherson wrote:
> > kvm_apic_match_dest()'s implementation lives in lapic.c so moving the
> > declaration to lapic.h makes perfect sense. kvm_irq_delivery_to_apic()'s
> > body is, however, in irq_comm.c and declarations for it are usually
> > found in asm/kvm_host.h. I'm not sure but maybe it would make sense to
> > move kvm_irq_delivery_to_apic()'s body to lapic.c too.
>
> asm/kvm_host.h is generally used only for exported functions, internal-only
> functions for irq_comm.c are declared in arch/x86/kvm/irq.h.

I think I'm fine with either lapic.h or irq.h. Let me do with irq.h.

I'll try to avoid moving the body of kvm_irq_delivery_to_apic() if you
don't disagree, I think it's ok to be in irq.c, while I'll normally
avoid doing those churns because I wanted to keep the git history
clean so it's easier to read the history per-line of that function. :)

Thanks,

--
Peter Xu