]> 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)
commit860f38bad78eacbc70b3822a11fc5ba840676191
tree21c99f0827c7ef76afc339aaba57551e4cfd4a07
parent675eda65c7b633b514d9880897d67d3c5fb41d63
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: 7e8f27f3f2eb ("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