[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 05/30] xen/public: Export cpu featureset information in the public API



>>> On 05.02.16 at 14:41, <andrew.cooper3@xxxxxxxxxx> wrote:
> +/* Intel-defined CPU features, CPUID level 0x00000001.edx, word 0 */
> +#define X86_FEATURE_FPU           ( 0*32+ 0) /*   Onboard FPU */

Regardless of you limiting the interface to tools only, I'm not
convinced exposing constants starting with X86_* here is
appropriate.

> +#define X86_FEATURE_XMM           ( 0*32+25) /*   Streaming SIMD Extensions 
> */
> +#define X86_FEATURE_XMM2          ( 0*32+26) /*   Streaming SIMD 
> Extensions-2 */
> [...]
> +/* Intel-defined CPU features, CPUID level 0x00000001.ecx, word 1 */
> +#define X86_FEATURE_XMM3          ( 1*32+ 0) /*   Streaming SIMD 
> Extensions-3 */

Apart from that exposing them should be done using canonical instead
of Linux-invented names, i.e. s/XMM/SSE/ for the above lines. I've
had a need to create a patch to do this just earlier today.

> +#define X86_FEATURE_SSSE3         ( 1*32+ 9) /*   Supplemental Streaming 
> SIMD Extensions-3 */

Note how this one and ...

> +#define X86_FEATURE_SSE4_1        ( 1*32+19) /*   Streaming SIMD Extensions 
> 4.1 */
> +#define X86_FEATURE_SSE4_2        ( 1*32+20) /*   Streaming SIMD Extensions 
> 4.2 */

... these two already use names matching the SDM.

Since canonicalization of the names implies changes elsewhere, I also
can't really offer to do the adjustments while committing.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.