u64 xstate_mask);
 
 void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr);
-int using_compacted_format(void);
 int xfeature_size(int xfeature_nr);
 int copy_kernel_to_xstate(struct xregs_state *xsave, const void *kbuf);
 int copy_user_to_xstate(struct xregs_state *xsave, const void __user *ubuf);
 
        return eax;
 }
 
-/*
- * 'XSAVES' implies two different things:
- * 1. saving of supervisor/system state
- * 2. using the compacted format
- *
- * Use this function when dealing with the compacted format so
- * that it is obvious which aspect of 'XSAVES' is being handled
- * by the calling code.
- */
-int using_compacted_format(void)
-{
-       return boot_cpu_has(X86_FEATURE_XSAVES);
-}
-
 /* Validate an xstate header supplied by userspace (ptrace or sigreturn) */
 static int validate_user_xstate_header(const struct xstate_header *hdr)
 {
                check_xstate_against_struct(i);
                /*
                 * Supervisor state components can be managed only by
-                * XSAVES, which is compacted-format only.
+                * XSAVES.
                 */
-               if (!using_compacted_format())
+               if (!cpu_feature_enabled(X86_FEATURE_XSAVES))
                        XSTATE_WARN_ON(xfeature_is_supervisor(i));
 
                /* Align from the end of the previous feature */
                 * The offset of a given state in the non-compacted
                 * format is given to us in a CPUID leaf.  We check
                 * them for being ordered (increasing offsets) in
-                * setup_xstate_features().
+                * setup_xstate_features(). XSAVES uses compacted format.
                 */
-               if (!using_compacted_format())
+               if (!cpu_feature_enabled(X86_FEATURE_XSAVES))
                        paranoid_xstate_size = xfeature_uncompacted_offset(i);
                /*
                 * The compacted-format offset always depends on where