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

Re: [Xen-devel] [PATCH] xen: x86: remove duplicated IA32_FEATURE_CONTROL MSR macro



>>> On 24.06.16 at 12:56, <kevin.tian@xxxxxxxxx> wrote:
>>  From: kaih.linux@xxxxxxxxx [mailto:kaih.linux@xxxxxxxxx]
>> Sent: Friday, June 24, 2016 6:45 PM
>> --- a/xen/include/asm-x86/msr-index.h
>> +++ b/xen/include/asm-x86/msr-index.h
>> @@ -133,12 +133,13 @@
>>  #define MSR_IA32_VMX_TRUE_EXIT_CTLS             0x48f
>>  #define MSR_IA32_VMX_TRUE_ENTRY_CTLS            0x490
>>  #define MSR_IA32_VMX_VMFUNC                     0x491
>> -#define IA32_FEATURE_CONTROL_MSR                0x3a
>> +#define MSR_IA32_FEATURE_CONTROL                0x3a
> 
> Instead of moving MSR definition up here, better move all related lines
> down since original place is more sorted regarding to 0x3a.

I agree.

>>  #define IA32_FEATURE_CONTROL_MSR_LOCK                     0x0001
>>  #define IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_INSIDE_SMX  0x0002
>>  #define IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON_OUTSIDE_SMX 0x0004
>>  #define IA32_FEATURE_CONTROL_MSR_SENTER_PARAM_CTL         0x7f00
>>  #define IA32_FEATURE_CONTROL_MSR_ENABLE_SENTER            0x8000
>> +#define IA32_FEATURE_CONTROL_MSR_SGX_ENABLE               0x40000
> 
> suppose above macros better be changed in same style? Or is it
> really meaningful to keep whole MSR name in every bit definition?
> Is it clearly enough to just keep strings after _MSR_?

I partly agree. The _MSR_ infix is clearly pointless. I wouldn't,
however, like to see the IA32_FEATURE_CONTROL_ prefix
dropped, as it helps associating the bits with their MSR.

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