]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: x86: Move PIT ioctl helpers to i8254.c
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 21:35:44 +0000 (14:35 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:52:44 +0000 (13:52 -0700)
commit00b5ebf8db7c382c7ea0074fdd79bdb9c65db236
treeb5af23a32bdadbe56b1afdb9141736eeeb0ef640
parent20218e69e85b0418f444227488c732e2c0b753b2
KVM: x86: Move PIT ioctl helpers to i8254.c

Move the PIT ioctl helpers to i8254.c, i.e. to the file that implements
PIT emulation.  Eliminating PIT code in x86.c will allow adding a Kconfig
to control support for in-kernel I/O APIC, PIC, and PIT emulation with
minimal #ifdefs.

Opportunistically make kvm_pit_set_reinject() and kvm_pit_load_count()
local to i8254.c as they were only publicly visible to make them available
to the ioctl helpers.

No functional change intended.

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