Re: [PATCH 200/208] x86/fpu/xstate: Don't assume the first zero xfeatures zero bit means the end

From: Dave Hansen
Date: Tue May 05 2015 - 16:11:29 EST


On 05/05/2015 10:58 AM, Ingo Molnar wrote:
> - do {
> + for (leaf = 2; leaf < xfeatures_nr; leaf++) {
> cpuid_count(XSTATE_CPUID, leaf, &eax, &ebx, &ecx, &edx);
>
> - if (eax == 0)
> - break;
> -
> xstate_offsets[leaf] = ebx;
> xstate_sizes[leaf] = eax;
>
> + printk(KERN_INFO "x86/fpu: xstate_offset[%d]: %04x, xstate_sizes[%d]: %04x\n", leaf, ebx, leaf, eax);
> leaf++;
> - } while (1);
> + }

We're going to have to revisit this. There's a new SDM out that makes
this incorrect. It says:

"If support for state component i is limited to XSAVES and XRSTORS, EBX
returns 0."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/