[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



Hi Kevin, Jan,

Thanks for comments.

On 6/24/2016 11:31 PM, Jan Beulich wrote:
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.

Sure. I'll move this macro down, along with the bit macros.


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

Sure. I think we can have consensus on just removing the _MSR_ infix, so the bit macros will be like IA32_FEATURE_CONTROL_LOCK, IA32_FEATURE_CONTROL_SGX_ENABLE, etc?

Thanks,
-Kai

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