Skip to contentSkip to conversation

kvm: better readability of efer_reserved_bits

PATCH Applied Lai Jiangshan 2 participants 2 messages Feb 21, 2011 – Feb 28, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: better readability of efer_reserved_bits

use EFER_SCE, EFER_LME and EFER_LMA instead of magic numbers.

---

arch/x86/kvm/x86.c +3 -2
index bcc0efc..9d1d3f2 100644
@@ -81,9 +81,10 @@
  * - enable LME and LMA per default on 64 bit KVM
  */
 #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
-static u64 __read_mostly efer_reserved_bits = 0xfffffffffffffffeULL;
+static u64 __read_mostly efer_reserved_bits = ~((u64)EFER_SCE);
 #endif
 
 #define VM_STAT(x) offsetof(struct kvm, stat.x), KVM_STAT_VM
Applied
#1 lore raw
Quoted 2 lines · Lai Jiangshan

use EFER_SCE, EFER_LME and EFER_LMA instead of magic numbers.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function