enabling legacy floating-point and sse state.
 
        eagerfpu=       [X86]
-                       on      enable eager fpu restore (default for xsaveopt)
+                       on      enable eager fpu restore
                        off     disable eager fpu restore
+                       auto    selects the default scheme, which automatically
+                               enables eagerfpu restore for xsaveopt.
 
        nohlt           [BUGS=ARM,SH] Tells the kernel that the sleep(SH) or
                        wfi(ARM) instruction doesn't work correctly and not to
 
        xsave_state(init_xstate_buf, -1);
 }
 
-static int disable_eagerfpu;
+static enum { AUTO, ENABLE, DISABLE } eagerfpu = AUTO;
 static int __init eager_fpu_setup(char *s)
 {
        if (!strcmp(s, "on"))
-               setup_force_cpu_cap(X86_FEATURE_EAGER_FPU);
+               eagerfpu = ENABLE;
        else if (!strcmp(s, "off"))
-               disable_eagerfpu = 1;
+               eagerfpu = DISABLE;
+       else if (!strcmp(s, "auto"))
+               eagerfpu = AUTO;
        return 1;
 }
 __setup("eagerfpu=", eager_fpu_setup);
        prepare_fx_sw_frame();
        setup_init_fpu_buf();
 
-       if (cpu_has_xsaveopt && !disable_eagerfpu)
-               setup_force_cpu_cap(X86_FEATURE_EAGER_FPU);
+       /* Auto enable eagerfpu for xsaveopt */
+       if (cpu_has_xsaveopt && eagerfpu != DISABLE)
+               eagerfpu = ENABLE;
 
        pr_info("enabled xstate_bv 0x%llx, cntxt size 0x%x\n",
                pcntxt_mask, xstate_size);
 
        clear_used_math();
        current_thread_info()->status = 0;
+
+       if (eagerfpu == ENABLE)
+               setup_force_cpu_cap(X86_FEATURE_EAGER_FPU);
+
        if (!cpu_has_eager_fpu) {
                stts();
                return;