Re: [PATCH v3 27/40] KVM: x86: Move register helper declarations from kvm_host.h => regs.h
From: Sean Christopherson
Date: Mon Jun 01 2026 - 10:24:43 EST
On Sat, May 30, 2026, Yosry Ahmed wrote:
> 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?
Page Directory Pointer Table Registers
^^^^^^^^^
Or as the SDM initially describes them, "5.4.1 PDPTE Registers". When using
PAE paging (not 64-bit paging), they really are CPU registers, and their lifecycle
is tied to CR{0,3,4}. I.e. I was thinking of them as an extension of Control
Registers. I can explicitly call that out in the changelog?