[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 17.02.16 at 14:08, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 12/02/16 16:27, Jan Beulich wrote:
>>>>> 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.
> 
> The toolstack already uses these exact names.  Patch 25 depends on me
> not changing any of these.

I don't see your reply being a meaningful response to my
statement above: If properly adding XEN_ prefixes here means
libxc needs further changes, so be it. Of course I also wouldn't
mind a model similar to that used in public/errno.h, allowing the
including site to control the generated names.

>>> +#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.
> 
> I can do this as a preparatory patch.  Any other names you want to me to
> change?

According to the SDM

PN -> PSN
CLFLUSH -> CLFSH
SELFSNOOP -> SS
HT -> HTT
ACC -> TM

MWAIT -> MONITOR
VMXE -> VMX
SMXE -> SMX
EST -> EIST
CID -> CNXTID
CX16 -> CMPXCHG16B

CMT -> PQM
CAT -> PQE

some of which I'm not really convinced should be changed (most
notably CLFLUSH and SELFSNOOP, but perhaps also at least CX16,
as that's in line with CX8).

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®.