]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Move spec control call after restore of GS
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 May 2018 13:21:01 +0000 (15:21 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 17 May 2018 15:09:16 +0000 (17:09 +0200)
commit298d73924f62a7d27c6b0dba47019a18c1c4910f
treea672809b542f900bddd85d7a3deea581913ebe58
parenteaba682304699292f27bf828ed459a1b4523d9de
KVM: SVM: Move spec control call after restore of GS

svm_vcpu_run() invokes x86_spec_ctrl_restore_host() after VMEXIT, but
before the host GS is restored. x86_spec_ctrl_restore_host() uses 'current'
to determine the host SSBD state of the thread. 'current' is GS based, but
host GS is not yet restored and the access causes a triple fault.

Move the call after the host GS restore.

Fixes: e88c8ef707d0 x86/process: Allow runtime control of Speculative Store Bypass
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c