Re: [PATCH v3 30/40] KVM: x86: Move MSR helper declarations from kvm_host.h => msrs.h

From: Sean Christopherson

Date: Fri Jun 05 2026 - 16:41:29 EST


On Fri, Jun 05, 2026, Kai Huang wrote:
> On Fri, 2026-05-29 at 15:22 -0700, Sean Christopherson wrote:
> > Relocate declarations of MSR helpers (and kvm_nr_uret_msrs) from x86's
> > x86's kvm_host.h to msrs, to continue trimming down kvm_host.h.
>
> Double x86's
>
> >
> > Deliberately leave the funky read_msr() where it is, as it will hopefully
> > be removed entirely as part of a broader kernel-API cleanup.
> >
> > No functional change intended.
> >
> > Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
>
> Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>
>
> Btw, not sure whether you like:
>
> We can also move the body of 'struct msr_bitmap_range' and 'struct
> kvm_x86_msr_filter' to "msrs.h" too, if we put one
>
> struct kvm_x86_msr_filter;
>
> to <asm/kvm_host.h> before 'struct kvm_arch'.

Even better, we can move it all the way to msrs.c. Same with the PMU event filter,
it can be moved to pmu.c. I'll do those in separate patches.

Thanks!