x86, fpu: check for consistency after loading fpregs
Paolo Bonzini
maintainerPATCH 1/1 x86, fpu: check for consistency after loading fpregs
fpregs_assert_state_consistent() does nothing if TIF_NEED_FPU_LOAD is set. But in that case the FPU *will* be loaded very soon; move the checks after the load, thus ensuring that they are performed.
Signed-off-by Paolo Bonzini <[email protected]>
--- arch/x86/kernel/fpu/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/fpu/core.c +2 -2
@@ -860,10 +860,10 @@ void fpregs_lock_and_load(void)fpregs_lock (); -fpregs_assert_state_consistent (); -if (test_thread_flag (TIF_NEED_FPU_LOAD ))fpregs_restore_userregs (); + +fpregs_assert_state_consistent (); }void fpu_load_guest_fpstate (struct fpu_guest *gfpu)
Signature · 1 line
2.52.0