]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: x86: Hardcode the PIT IRQ source ID to '2'
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 21:35:49 +0000 (14:35 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:52:47 +0000 (13:52 -0700)
commit61423c413a746fd5fe5b0d865ea722e11b01105e
tree2167d357c9379f153b9a82218a134d97a65c4db6
parent77a74b8ff41ae620f5a5d727d596b670b7b9994e
KVM: x86: Hardcode the PIT IRQ source ID to '2'

Hardcode the PIT's source IRQ ID to '2' instead of "finding" that bit 2
is always the first available bit in irq_sources_bitmap.  Bits 0 and 1 are
set/reserved by kvm_arch_init_vm(), i.e. long before kvm_create_pit() can
be invoked, and KVM allows at most one in-kernel PIT instance, i.e. it's
impossible for the PIT to find a different free bit (there are no other
users of kvm_request_irq_source_id().

Delete the now-defunct irq_sources_bitmap and all its associated code.

Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20250611213557.294358-11-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/i8254.c
arch/x86/kvm/i8254.h
arch/x86/kvm/x86.c
include/linux/kvm_host.h