aboutsummaryrefslogtreecommitdiffstats
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorPaolo Bonzini <[email protected]>2017-08-23 21:16:29 +0000
committerPaolo Bonzini <[email protected]>2017-08-25 07:28:37 +0000
commit38cfd5e3df9c4f88e76b547eee2087ee5c042ae2 (patch)
treea6f60166609560bc722887d8449872599a2498bf /net/switchdev/switchdev.c
parentKVM: x86: simplify handling of PKRU (diff)
downloadkernel-38cfd5e3df9c4f88e76b547eee2087ee5c042ae2.tar.gz
kernel-38cfd5e3df9c4f88e76b547eee2087ee5c042ae2.zip
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 <[email protected]> Cc: Yang Zhang <[email protected]> Fixes: 1be0e61c1f255faaeab04a390e00c8b9b9042870 Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions