Re: [PATCH] KVM: x86: Add a WARN on TIF_NEED_FPU_LOAD in kvm_load_guest_fpu()

From: Paolo Bonzini
Date: Tue Dec 10 2019 - 05:29:08 EST


On 09/12/19 21:05, Sean Christopherson wrote:
> + /*
> + * Reloading userspace's FPU is handled by kvm_arch_vcpu_load(), both
> + * for direct calls from userspace (via vcpu_load()) and if this task
> + * is preempted (via kvm_arch_sched_in()) between vcpu_load() and now.

via kvm_sched_in (not the arch_ function). Applied with that change.

Paolo

> + */
> + WARN_ON_ONCE(test_thread_flag(TIF_NEED_FPU_LOAD));
> +