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

From: Huang, Kai

Date: Wed Jun 03 2026 - 07:34:26 EST


On Fri, 2026-05-29 at 15:21 -0700, Sean Christopherson wrote:
> Introduce regs.c, and move the vast majority of register specific code out
> of x86.c and into regs.c. Deliberately leave behind MSR code (except for
> EFER, which can hardly be called an MSR), as KVM's MSR support is complex
> enough to warrant its own compilation unit, and doesn't have much in common
> with the other register code.
>
> No functional change intended.
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
>

Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>


> @@ -12691,11 +11882,7 @@ static void store_regs(struct kvm_vcpu *vcpu)
> {
> BUILD_BUG_ON(sizeof(struct kvm_sync_regs) > SYNC_REGS_SIZE_BYTES);

This BUILD_BUG_ON() can be removed too since the new kvm_run_sync_regs_to_user()
already has it.