]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: retrieve VMCB from assembly
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 7 Nov 2022 09:17:29 +0000 (04:17 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Nov 2022 17:16:57 +0000 (12:16 -0500)
commitf6d58266d731fd7e63163790aad21e0dbb1d5264
tree21c99f0827c7ef76afc339aaba57551e4cfd4a07
parentf7ef280132f9bf6f82acf5aa5c3c837206eef501
KVM: SVM: retrieve VMCB from assembly

Continue moving accesses to struct vcpu_svm to vmenter.S.  Reducing the
number of arguments limits the chance of mistakes due to different
registers used for argument passing in 32- and 64-bit ABIs; pushing the
VMCB argument and almost immediately popping it into a different
register looks pretty weird.

32-bit ABI is not a concern for __svm_sev_es_vcpu_run() which is 64-bit
only; however, it will soon need @svm to save/restore SPEC_CTRL so stay
consistent with __svm_vcpu_run() and let them share the same prototype.

No functional change intended.

Cc: stable@vger.kernel.org
Fixes: a149180fbcf3 ("x86: Add magic AMD return-thunk")
Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/kvm-asm-offsets.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h
arch/x86/kvm/svm/vmenter.S