]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM/VMX: Clear spec_ctrl status when resetting vcpu
authorPatrick Colp <patrick.colp@oracle.com>
Wed, 28 Mar 2018 01:30:49 +0000 (18:30 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 29 Mar 2018 04:12:58 +0000 (21:12 -0700)
commiteff9be9f24ff13884edad0259b270d2c27d9808d
treebb47bbe08c3cc1d044042f97e425b75462cb0d02
parente7567cf1d53bddbe233dabea5c632658671dae9e
KVM/VMX: Clear spec_ctrl status when resetting vcpu

vmx->spec_ctrl was not set to 0 in vmx_vcpu_reset, which could result in
IBRS getting stuck on all the time, even with 'spectre_v2=off' set. This
was most notable when rebooting from an older kernel into a newer
retpoline-enabled kernel resulted in up to 80% CPU performance drop.

OraBug: 27774415

Suggested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Patrick Colp <patrick.colp@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/kvm/vmx.c