linux-stable/arch/x86/include/asm/fpu
Paolo Bonzini 38cfd5e3df KVM, pkeys: do not use PKRU value in vcpu->arch.guest_fpu.state
The host pkru is restored right after vcpu exit (commit 1be0e61), so
KVM_GET_XSAVE will return the host PKRU value instead.  Fix this by
using the guest PKRU explicitly in fill_xsave and load_xsave.  This
part is based on a patch by Junkang Fu.

The host PKRU data may also not match the value in vcpu->arch.guest_fpu.state,
because it could have been changed by userspace since the last time
it was saved, so skip loading it in kvm_load_guest_fpu.

Reported-by: Junkang Fu <junkang.fjk@alibaba-inc.com>
Cc: Yang Zhang <zy107165@alibaba-inc.com>
Fixes: 1be0e61c1f
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-08-25 09:28:37 +02:00
..
api.h x86/fpu: Remove irq_ts_save() and irq_ts_restore() 2016-11-01 07:47:54 +01:00
internal.h KVM, pkeys: do not use PKRU value in vcpu->arch.guest_fpu.state 2017-08-25 09:28:37 +02:00
regset.h x86/fpu: Factor out fpu/regset.h from fpu/internal.h 2015-05-19 15:48:06 +02:00
signal.h x86/signal: Add SA_{X32,IA32}_ABI sa_flags 2016-09-14 21:28:11 +02:00
types.h x86/fpu: Finish excising 'eagerfpu' 2016-10-18 09:56:03 +02:00
xstate.h x86/fpu: Remove the XFEATURE_MASK_EAGER/LAZY distinction 2016-10-07 11:14:29 +02:00