x86: Detect XSAVEOPT
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 29 Feb 2016 20:49:24 +0000 (15:49 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 29 Feb 2016 21:59:02 +0000 (16:59 -0500)
commit11f9f1808acd6d8299eabf6d796fbedeb60b6e1e
tree3305f484f128e882e83565607973a4a3788c5b95
parent5f18d6ac184f7f7d0edd53d67cfab75d7395b649
x86: Detect XSAVEOPT

This is an  examples of how the kernel can set and query CPU features.  For
the most part, we should do all of the cpu_set_feat() very early during
boot in cpuinfo.

XSAVEOPT implies XSAVE, so we have just CPU_FEAT_X86_XSAVEOPT.

With these changes, both the user and the kernel can check at runtime for
XSAVEOPT and adapt accordingly.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/cpuinfo.c
kern/arch/x86/init.c