提交 1260edbe 编写于 作者: L Lai Jiangshan 提交者: Marcelo Tosatti

KVM: better readability of efer_reserved_bits

use EFER_SCE, EFER_LME and EFER_LMA instead of magic numbers.
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 d170c419
...@@ -81,9 +81,10 @@ ...@@ -81,9 +81,10 @@
* - enable LME and LMA per default on 64 bit KVM * - enable LME and LMA per default on 64 bit KVM
*/ */
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64
static u64 __read_mostly efer_reserved_bits = 0xfffffffffffffafeULL; static
u64 __read_mostly efer_reserved_bits = ~((u64)(EFER_SCE | EFER_LME | EFER_LMA));
#else #else
static u64 __read_mostly efer_reserved_bits = 0xfffffffffffffffeULL; static u64 __read_mostly efer_reserved_bits = ~((u64)EFER_SCE);
#endif #endif
#define VM_STAT(x) offsetof(struct kvm, stat.x), KVM_STAT_VM #define VM_STAT(x) offsetof(struct kvm, stat.x), KVM_STAT_VM
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册