]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: restore host save area from assembly
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 7 Nov 2022 08:49:59 +0000 (03:49 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Nov 2022 17:25:33 +0000 (12:25 -0500)
commit174ec97405d877f560b4921d10b25a96e9b13a33
tree10e0fac1c9d0378b3af82dbc882c695352177e93
parent54269c14993bfab67516522e8f75e6ddf258ce6d
KVM: SVM: restore host save area from assembly

Allow access to the percpu area via the GS segment base, which is
needed in order to access the saved host spec_ctrl value.  In linux-next
FILL_RETURN_BUFFER also needs to access percpu data.

For simplicity, the physical address of the save area is added to struct
svm_cpu_data.

Cc: stable@vger.kernel.org
Fixes: 7e8f27f3f2eb ("x86: Add magic AMD return-thunk")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Analyzed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
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/svm_ops.h
arch/x86/kvm/svm/vmenter.S