Re: [PATCH v3 30/40] KVM: x86: Move MSR helper declarations from kvm_host.h => msrs.h
From: Yosry Ahmed
Date: Fri May 29 2026 - 20:59:29 EST
On Fri, May 29, 2026 at 03:22:13PM -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.
>
> 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>
> ---
> arch/x86/include/asm/kvm_host.h | 26 -------------------------
> arch/x86/kvm/msrs.h | 34 ++++++++++++++++++++++++++++++---
> 2 files changed, 31 insertions(+), 29 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index a861c0d70be0..1143140592df 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -2094,7 +2094,6 @@ struct kvm_arch_async_pf {
> u64 error_code;
> };
>
> -extern u32 __read_mostly kvm_nr_uret_msrs;
> extern bool __read_mostly allow_smaller_maxphyaddr;
> extern bool __read_mostly enable_apicv;
> extern bool __read_mostly enable_ipiv;
> @@ -2278,18 +2277,6 @@ void kvm_prepare_emulation_failure_exit(struct kvm_vcpu *vcpu);
> void kvm_prepare_event_vectoring_exit(struct kvm_vcpu *vcpu, gpa_t gpa);
> void kvm_prepare_unexpected_reason_exit(struct kvm_vcpu *vcpu, u64 exit_reason);
>
> -void kvm_enable_efer_bits(u64);
> -bool kvm_valid_efer(struct kvm_vcpu *vcpu, u64 efer);
Patch 15's changelog makes me thing EFER will belong to regs.[hc] not
msrs.[hc]. Did you change your mind?