Lines Matching refs:xfeature_nr
110 static int xfeature_is_supervisor(int xfeature_nr) in xfeature_is_supervisor() argument
122 cpuid_count(XSTATE_CPUID, xfeature_nr, &eax, &ebx, &ecx, &edx); in xfeature_is_supervisor()
126 static int xfeature_is_user(int xfeature_nr) in xfeature_is_user() argument
128 return !xfeature_is_supervisor(xfeature_nr); in xfeature_is_user()
324 static int xfeature_is_aligned(int xfeature_nr) in xfeature_is_aligned() argument
328 CHECK_XFEATURE(xfeature_nr); in xfeature_is_aligned()
329 cpuid_count(XSTATE_CPUID, xfeature_nr, &eax, &ebx, &ecx, &edx); in xfeature_is_aligned()
432 static int xfeature_uncompacted_offset(int xfeature_nr) in xfeature_uncompacted_offset() argument
441 if (XFEATURE_MASK_SUPERVISOR & BIT_ULL(xfeature_nr)) { in xfeature_uncompacted_offset()
442 WARN_ONCE(1, "No fixed offset for xstate %d\n", xfeature_nr); in xfeature_uncompacted_offset()
446 CHECK_XFEATURE(xfeature_nr); in xfeature_uncompacted_offset()
447 cpuid_count(XSTATE_CPUID, xfeature_nr, &eax, &ebx, &ecx, &edx); in xfeature_uncompacted_offset()
451 static int xfeature_size(int xfeature_nr) in xfeature_size() argument
455 CHECK_XFEATURE(xfeature_nr); in xfeature_size()
456 cpuid_count(XSTATE_CPUID, xfeature_nr, &eax, &ebx, &ecx, &edx); in xfeature_size()
806 static void *__raw_xsave_addr(struct xregs_state *xsave, int xfeature_nr) in __raw_xsave_addr() argument
808 if (!xfeature_enabled(xfeature_nr)) { in __raw_xsave_addr()
813 return (void *)xsave + xstate_comp_offsets[xfeature_nr]; in __raw_xsave_addr()
833 void *get_xsave_addr(struct xregs_state *xsave, int xfeature_nr) in get_xsave_addr() argument
846 WARN_ONCE(!(xfeatures_mask & BIT_ULL(xfeature_nr)), in get_xsave_addr()
859 if (!(xsave->header.xfeatures & BIT_ULL(xfeature_nr))) in get_xsave_addr()
862 return __raw_xsave_addr(xsave, xfeature_nr); in get_xsave_addr()
883 const void *get_xsave_field_ptr(int xfeature_nr) in get_xsave_field_ptr() argument
893 return get_xsave_addr(&fpu->state.xsave, xfeature_nr); in get_xsave_field_ptr()