On 13/07/2017 10:53, Yang Zhang wrote: >> >> Even if it is restored correctly, you will have the wrong PKRU on the >> host between kvm_load_guest_fpu and entering the guest. > > Before kvm_load_guest_fpu or after? kvm_load_guest_fpu will load the > right pkru. It's the right pkru for the guest, but the wrong for the host. And if vmx->guest_pkru_valid is true for whatever reason, it will be overwritten in vmx_vcpu_run. Paolo