public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: better readability of efer_reserved_bits
@ 2011-02-21  3:51 Lai Jiangshan
  2011-02-28  9:21 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2011-02-21  3:51 UTC (permalink / raw)
  To: LKML, kvm@vger.kernel.org, Avi Kivity, Marcelo Tosatti


use EFER_SCE, EFER_LME and EFER_LMA instead of magic numbers.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bcc0efc..9d1d3f2 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: better readability of efer_reserved_bits
  2011-02-21  3:51 [PATCH] kvm: better readability of efer_reserved_bits Lai Jiangshan
@ 2011-02-28  9:21 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2011-02-28  9:21 UTC (permalink / raw)
  To: Lai Jiangshan; +Cc: LKML, kvm@vger.kernel.org, Marcelo Tosatti

On 02/21/2011 05:51 AM, Lai Jiangshan wrote:
> use EFER_SCE, EFER_LME and EFER_LMA instead of magic numbers.
>

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-28  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21  3:51 [PATCH] kvm: better readability of efer_reserved_bits Lai Jiangshan
2011-02-28  9:21 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox