Re: [PATCH v3 27/40] KVM: x86: Move register helper declarations from kvm_host.h => regs.h

From: Yosry Ahmed

Date: Fri May 29 2026 - 20:58:52 EST


On Fri, May 29, 2026 at 03:22:10PM -0700, Sean Christopherson wrote:
> Relocate declarations of Control/Debug Register, EFLAGS and RIP helpers
> from x86's kvm_host.h to regs.h, to continue trimming down kvm_host.h.
>
> No functional change intended.
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
> arch/x86/include/asm/kvm_host.h | 17 -----------------
> arch/x86/kvm/regs.h | 17 +++++++++++++++++
> 2 files changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 19091d89d3cc..0f4b16b26a27 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -2186,8 +2186,6 @@ void kvm_mmu_invalidate_mmio_sptes(struct kvm *kvm, u64 gen);
> void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned long kvm_nr_mmu_pages);
> void kvm_zap_gfn_range(struct kvm *kvm, gfn_t gfn_start, gfn_t gfn_end);
>
> -int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3);

Why are pdptrs helpers bundled with register helpers?