static void x86_cpu_init_xsave(void)
{
static bool first = true;
- uint64_t supported_xcr0;
+ uint64_t supported_xcr0, supported_xss;
int i;
if (first) {
first = false;
supported_xcr0 =
- ((uint64_t) x86_cpu_get_supported_feature_word(NULL, FEAT_XSAVE_XCR0_HI) << 32) |
+ x86_cpu_get_supported_feature_word(NULL, FEAT_XSAVE_XCR0_HI) << 32 |
x86_cpu_get_supported_feature_word(NULL, FEAT_XSAVE_XCR0_LO);
+ supported_xss =
+ x86_cpu_get_supported_feature_word(NULL, FEAT_XSAVE_XSS_HI) << 32 |
+ x86_cpu_get_supported_feature_word(NULL, FEAT_XSAVE_XSS_LO);
for (i = XSTATE_SSE_BIT + 1; i < XSAVE_STATE_AREA_COUNT; i++) {
ExtSaveArea *esa = &x86_ext_save_areas[i];
- if (!(supported_xcr0 & (1 << i))) {
+ if (!((supported_xcr0 | supported_xss) & (1 << i))) {
esa->size = 0;
}
}