Re: [PATCH v2 05/18] KVM: x86: Move PIT ioctl helpers to i8254.c

From: Huang, Kai
Date: Wed Jun 11 2025 - 22:10:05 EST


On Wed, 2025-06-11 at 14:35 -0700, Sean Christopherson wrote:
> 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.

And it matches the other (existing) ioctl helpers which are under
CONFIG_KVM_HYPERV [*] and CONFIG_KVM_XEN too.

[*]: The kvm_ioctl_get_supported_hv_cpuid() seems to be the only one that
still remains in kvm/x86.c but not in kvm/hyperv.c.

>
> 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.
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---

Acked-by: Kai Huang <kai.huang@xxxxxxxxx>