Re: [PATCH v2 15/15] KVM: x86: Move the bulk of register specific code from x86.c to regs.c

From: Sean Christopherson

Date: Thu May 21 2026 - 14:47:56 EST


On Wed, May 20, 2026, Kai Huang wrote:
> On Wed, 2026-05-20 at 11:11 -0700, Sean Christopherson wrote:
> > On Wed, May 20, 2026, Kai Huang wrote:
> > > But if we want to hide KVM internal structures, I don't see any other options
> > > except virt/kvm/include/ is the place to go?
> >
> > arch/$(ARCH)/kvm/kvm_arch.h is the obvious approach. Code in virt/kvm can reach
> > arch/$(ARCH)/kvm, we just need to add it to the include path. That's why I was
> > working on unifying the include definitions.
>
> Yeah, for asm/kvm_host.h.
>
> But if I am still following you we still need a place for linux/kvm_host.h, for
> which I thought virt/kvm/include/ would be the place at first glance.

Oh, yes, the KVM-internal pieces of linuy/kvm_host.h would live in virt/kvm.