| .. | .. | 
|---|
| 114 | 114 |  	XFEATURE_Hi16_ZMM, | 
|---|
| 115 | 115 |  	XFEATURE_PT_UNIMPLEMENTED_SO_FAR, | 
|---|
| 116 | 116 |  	XFEATURE_PKRU, | 
|---|
 | 117 | +	XFEATURE_PASID,  | 
|---|
 | 118 | +	XFEATURE_RSRVD_COMP_11,  | 
|---|
 | 119 | +	XFEATURE_RSRVD_COMP_12,  | 
|---|
 | 120 | +	XFEATURE_RSRVD_COMP_13,  | 
|---|
 | 121 | +	XFEATURE_RSRVD_COMP_14,  | 
|---|
 | 122 | +	XFEATURE_LBR,  | 
|---|
| 117 | 123 |   | 
|---|
| 118 | 124 |  	XFEATURE_MAX, | 
|---|
| 119 | 125 |  }; | 
|---|
| .. | .. | 
|---|
| 128 | 134 |  #define XFEATURE_MASK_Hi16_ZMM		(1 << XFEATURE_Hi16_ZMM) | 
|---|
| 129 | 135 |  #define XFEATURE_MASK_PT		(1 << XFEATURE_PT_UNIMPLEMENTED_SO_FAR) | 
|---|
| 130 | 136 |  #define XFEATURE_MASK_PKRU		(1 << XFEATURE_PKRU) | 
|---|
 | 137 | +#define XFEATURE_MASK_PASID		(1 << XFEATURE_PASID)  | 
|---|
 | 138 | +#define XFEATURE_MASK_LBR		(1 << XFEATURE_LBR)  | 
|---|
| 131 | 139 |   | 
|---|
| 132 | 140 |  #define XFEATURE_MASK_FPSSE		(XFEATURE_MASK_FP | XFEATURE_MASK_SSE) | 
|---|
| 133 | 141 |  #define XFEATURE_MASK_AVX512		(XFEATURE_MASK_OPMASK \ | 
|---|
| .. | .. | 
|---|
| 229 | 237 |  	u32				pad; | 
|---|
| 230 | 238 |  } __packed; | 
|---|
| 231 | 239 |   | 
|---|
 | 240 | +/*  | 
|---|
 | 241 | + * State component 15: Architectural LBR configuration state.  | 
|---|
 | 242 | + * The size of Arch LBR state depends on the number of LBRs (lbr_depth).  | 
|---|
 | 243 | + */  | 
|---|
 | 244 | +  | 
|---|
 | 245 | +struct lbr_entry {  | 
|---|
 | 246 | +	u64 from;  | 
|---|
 | 247 | +	u64 to;  | 
|---|
 | 248 | +	u64 info;  | 
|---|
 | 249 | +};  | 
|---|
 | 250 | +  | 
|---|
 | 251 | +struct arch_lbr_state {  | 
|---|
 | 252 | +	u64 lbr_ctl;  | 
|---|
 | 253 | +	u64 lbr_depth;  | 
|---|
 | 254 | +	u64 ler_from;  | 
|---|
 | 255 | +	u64 ler_to;  | 
|---|
 | 256 | +	u64 ler_info;  | 
|---|
 | 257 | +	struct lbr_entry		entries[];  | 
|---|
 | 258 | +} __packed;  | 
|---|
 | 259 | +  | 
|---|
 | 260 | +/*  | 
|---|
 | 261 | + * State component 10 is supervisor state used for context-switching the  | 
|---|
 | 262 | + * PASID state.  | 
|---|
 | 263 | + */  | 
|---|
 | 264 | +struct ia32_pasid_state {  | 
|---|
 | 265 | +	u64 pasid;  | 
|---|
 | 266 | +} __packed;  | 
|---|
 | 267 | +  | 
|---|
| 232 | 268 |  struct xstate_header { | 
|---|
| 233 | 269 |  	u64				xfeatures; | 
|---|
| 234 | 270 |  	u64				xcomp_bv; | 
|---|
| .. | .. | 
|---|
| 294 | 330 |  	unsigned int			last_cpu; | 
|---|
| 295 | 331 |   | 
|---|
| 296 | 332 |  	/* | 
|---|
| 297 |  | -	 * @initialized:  | 
|---|
 | 333 | +	 * @avx512_timestamp:  | 
|---|
| 298 | 334 |  	 * | 
|---|
| 299 |  | -	 * This flag indicates whether this context is initialized: if the task  | 
|---|
| 300 |  | -	 * is not running then we can restore from this context, if the task  | 
|---|
| 301 |  | -	 * is running then we should save into this context.  | 
|---|
 | 335 | +	 * Records the timestamp of AVX512 use during last context switch.  | 
|---|
| 302 | 336 |  	 */ | 
|---|
| 303 |  | -	unsigned char			initialized;  | 
|---|
 | 337 | +	unsigned long			avx512_timestamp;  | 
|---|
| 304 | 338 |   | 
|---|
| 305 | 339 |  	/* | 
|---|
| 306 | 340 |  	 * @state: | 
|---|