[PATCH v2 0/3] KVM: Macrofy GPR swapping in assembly code

From: Paolo Bonzini

Date: Fri May 15 2026 - 13:28:19 EST


A small change to Chang's patches from the APX series.
The main change is keeping __VCPU_REGS_* constants to avoid
relying on the ordering of constants in kvm_host.h, but I also
cleaned up the macros a bit to reduce the line code count
and clarify what is going on.

Paolo

v1->v2: remove unused r8d-r15d cases, clarify commit message,
add comment, centralize .error usage in kvm_vcpu_regs.h



Chang S. Bae (3):
KVM: VMX: Macrofy GPR swapping in __vmx_vcpu_run()
KVM: SVM: Macrofy GPR swapping in __svm_vcpu_run()
KVM: SEV: Macrofy GPR swapping in __svm_sev_es_vcpu_run()

arch/x86/include/asm/kvm_host.h | 16 ++--
arch/x86/include/asm/kvm_vcpu_regs.h | 109 +++++++++++++++++++++++++--
arch/x86/kvm/svm/vmenter.S | 107 ++++++--------------------
arch/x86/kvm/vmenter.h | 31 ++++++++
arch/x86/kvm/vmx/vmenter.S | 89 +++++-----------------
5 files changed, 181 insertions(+), 171 deletions(-)

--
2.52.0