diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-08-23 23:16:29 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-08-25 09:28:37 +0200 |
commit | 38cfd5e3df9c4f88e76b547eee2087ee5c042ae2 (patch) | |
tree | a6f60166609560bc722887d8449872599a2498bf /arch/powerpc/kvm | |
parent | b9dd21e104bcd45e124acfe978a79df71259e59b (diff) |
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: 1be0e61c1f255faaeab04a390e00c8b9b9042870
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
0 files changed, 0 insertions, 0 deletions