Re: [PATCH v3 36/40] KVM: x86: Move IRQ-related helper declarations from kvm_host.h => irq.h
From: Yosry Ahmed
Date: Fri May 29 2026 - 21:10:47 EST
On Fri, May 29, 2026 at 03:22:19PM -0700, Sean Christopherson wrote:
> Move the function declaration for APIs to get/query pending IRQs from
> kvm_host.h to irq.h, as the APIs are only used by KVM x86 code.
>
> No functional change intended.
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
> arch/x86/include/asm/kvm_host.h | 5 -----
> arch/x86/kvm/irq.h | 6 ++++++
> arch/x86/kvm/svm/nested.c | 1 +
> arch/x86/kvm/vmx/nested.c | 1 +
> 4 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 866d33abaee0..38de6c0dc743 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -2360,12 +2360,7 @@ enum {
> # define kvm_memslots_for_spte_role(kvm, role) __kvm_memslots(kvm, 0)
> #endif
>
> -int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v);
> -int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu);
> -int kvm_cpu_has_extint(struct kvm_vcpu *v);
> int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu);
kvm_arch_interrupt_allowed() is only used in x86.c. Probably it wasn't
used outside of x86 code after a1b37100d9e29c1f8dc3e2f5490a205c80180e01.
It should probably be renamed and moved, maybe separately.
Anyway:
Reviewed-by: Yosry Ahmed <yosry@xxxxxxxxxx>