From patchwork Sat Oct 24 04:49:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 55700 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9O4oQvZ015701 for ; Sat, 24 Oct 2009 04:50:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751666AbZJXEuQ (ORCPT ); Sat, 24 Oct 2009 00:50:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752134AbZJXEuQ (ORCPT ); Sat, 24 Oct 2009 00:50:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54347 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbZJXEuF (ORCPT ); Sat, 24 Oct 2009 00:50:05 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9O4o9gk029326 for ; Sat, 24 Oct 2009 00:50:10 -0400 Received: from blackpad.lan.raisama.net (vpn-12-7.rdu.redhat.com [10.11.12.7]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9O4o7Mi029875; Sat, 24 Oct 2009 00:50:08 -0400 Received: by blackpad.lan.raisama.net (Postfix, from userid 500) id 89E3517FD07; Sat, 24 Oct 2009 02:50:00 -0200 (BRST) From: Eduardo Habkost To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH 1/3] kvm: vmx: use macros instead of hex value on cr0 initialization Date: Sat, 24 Oct 2009 02:49:58 -0200 Message-Id: <1256359800-16893-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1256359800-16893-1-git-send-email-ehabkost@redhat.com> References: <1256359800-16893-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 364263a..42409cc 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2538,7 +2538,7 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu) if (vmx->vpid != 0) vmcs_write16(VIRTUAL_PROCESSOR_ID, vmx->vpid); - vmx->vcpu.arch.cr0 = 0x60000010; + vmx->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET; vmx_set_cr0(&vmx->vcpu, vmx->vcpu.arch.cr0); /* enter rmode */ vmx_set_cr4(&vmx->vcpu, 0); vmx_set_efer(&vmx->vcpu, 0);