]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Merge branch 'kvm-vmenter' into HEAD
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 4 May 2026 08:52:27 +0000 (04:52 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 10 May 2026 13:01:36 +0000 (15:01 +0200)
commitfcaf986d10768dddb23598d6f0560006dad0c8bd
tree77a67bbb7c21366f73b22cc58183cd169687d26b
parent2be108307eae241359bb32ee259ba0b5378156aa
parent344ebd21f2c9d59fb6d7a409eedf8b31d8b0f17e
Merge branch 'kvm-vmenter' into HEAD

Move SPEC_CTRL handling for VMX entirely to vmenter.S, also improving
assembly code reuse between SVM and VMX.

The prototype of __vmx_vcpu_run() and __svm_vcpu_run() becomes
the same, with a set of bit flags for the second argument.
The register allocation also becomes very similar, with %edi/%rdi
pointing to the vmx (resp. svm) argument.

Thanks to this, the code to save and restore SPEC_CTRL values for the
host and guest is the same up to the register names and can be dropped
into a new header arch/x86/kvm/vmenter.h.  APX enablement will also move
common code to load and save registers from VMX and SVM to vmenter.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h