Re: [PATCH v4 14/30] KVM: x86: Move the bulk of MSR specific code from x86.c to msrs.{c,h}

From: Binbin Wu

Date: Mon Jun 15 2026 - 05:31:03 EST




On 6/13/2026 8:03 AM, Sean Christopherson wrote:
> Introduce msrs.{c,h}, and move the vast majority of MSR specific code out
> of x86.{c,h}. Use a plural "msrs" instead of just "msr" to be consistent
> with regs.{c,h}, and to make it easier to differentiate KVM's code from the
> other 5+ msr.c files in the kernel.
>
> Opportunistically drop the "x86.h" include from mtrr.c, mostly as proof
> that the bulk of the MSR code is indeed being relocated to msrs.c.
>
> No functional change intended.
>
> Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>

One nit below.

[...]> diff --git a/arch/x86/kvm/msrs.h b/arch/x86/kvm/msrs.h
> new file mode 100644
> index 000000000000..25b75fe39b80
> --- /dev/null
> +++ b/arch/x86/kvm/msrs.h
> @@ -0,0 +1,128 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef ARCH_X86_KVM_MSR_H
> +#define ARCH_X86_KVM_MSR_H

To align with the file name,
ARCH_X86_KVM_MSR_H -> ARCH_X86_KVM_MSRS_H ?