KVM: x86: Add a WARN on TIF_NEED_FPU_LOAD in kvm_load_guest_fpu()
authorSean Christopherson <sean.j.christopherson@intel.com>
Mon, 9 Dec 2019 20:05:17 +0000 (12:05 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jan 2020 17:16:02 +0000 (18:16 +0100)
commit95145c25a78cc0a9d3cbc75708abde432310c5a1
tree5bdfd34337bfb6a0ef955f78d8d667cead2d4061
parentf958bd2314d117f8c29f4821401bc1925bc2e5ef
KVM: x86: Add a WARN on TIF_NEED_FPU_LOAD in kvm_load_guest_fpu()

WARN once in kvm_load_guest_fpu() if TIF_NEED_FPU_LOAD is observed, as
that would mean that KVM is corrupting userspace's FPU by saving
unknown register state into arch.user_fpu.  Add a comment to explain
why KVM WARNs on TIF_NEED_FPU_LOAD instead of implementing logic
similar to fpu__copy().

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c