From: Paolo Bonzini Date: Sat, 30 May 2026 20:37:48 +0000 (+0200) Subject: Merge commit 'kvm-vmenter-load-store-regs' into HEAD X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ffb83b98357658b44a8a3b617a42d7ae48514ffd;p=thirdparty%2Flinux.git Merge commit 'kvm-vmenter-load-store-regs' into HEAD Convert the repeated register save/restore sequences into macros, trading some level of implementation trickiness for conciseness (more than one register can be saved/restored with one invocation) and a smaller chance of cut and paste errors between VMX and SVM files. This becomes more useful with the upcoming support for APX, which would need to add 32 lines to the VM entry/exit paths. Signed-off-by: Paolo Bonzini --- ffb83b98357658b44a8a3b617a42d7ae48514ffd diff --cc arch/x86/include/asm/kvm_host.h index 8a53ca6195701,aa77ccb7aaa58..53527b0550c7e --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@@ -182,21 -182,20 +182,21 @@@ enum kvm_reg VCPU_REGS_RSI = __VCPU_REGS_RSI, VCPU_REGS_RDI = __VCPU_REGS_RDI, #ifdef CONFIG_X86_64 - VCPU_REGS_R8 = __VCPU_REGS_R8, - VCPU_REGS_R9 = __VCPU_REGS_R9, - VCPU_REGS_R10 = __VCPU_REGS_R10, - VCPU_REGS_R11 = __VCPU_REGS_R11, - VCPU_REGS_R12 = __VCPU_REGS_R12, - VCPU_REGS_R13 = __VCPU_REGS_R13, - VCPU_REGS_R14 = __VCPU_REGS_R14, - VCPU_REGS_R15 = __VCPU_REGS_R15, + VCPU_REGS_R8 = 8, + VCPU_REGS_R9, + VCPU_REGS_R10, + VCPU_REGS_R11, + VCPU_REGS_R12, + VCPU_REGS_R13, + VCPU_REGS_R14, + VCPU_REGS_R15, #endif - VCPU_REGS_RIP, - NR_VCPU_REGS, + NR_VCPU_GENERAL_PURPOSE_REGS, - VCPU_EXREG_PDPTR = NR_VCPU_REGS, - VCPU_EXREG_CR0, + VCPU_REG_RIP = NR_VCPU_GENERAL_PURPOSE_REGS, + + VCPU_REG_PDPTR, + VCPU_REG_CR0, /* * Alias AMD's ERAPS (not a real register) to CR3 so that common code * can trigger emulation of the RAP (Return Address Predictor) with