From: Eduardo Habkost Subject: [PATCH 3/3] kvm: svm: init_vmcb(): remove redundant save->cr0 initialization Date: Sat, 24 Oct 2009 02:50:00 -0200 Message-ID: <1256359800-16893-4-git-send-email-ehabkost@redhat.com> References: <1256359800-16893-1-git-send-email-ehabkost@redhat.com> Cc: kvm@vger.kernel.org To: Avi Kivity , Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46285 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbZJXEt7 (ORCPT ); Sat, 24 Oct 2009 00:49:59 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9O4o48r004415 for ; Sat, 24 Oct 2009 00:50:04 -0400 In-Reply-To: <1256359800-16893-1-git-send-email-ehabkost@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: The svm_set_cr0() call will initialize save->cr0 properly even when npt is enabled, clearing the NW and CD bits as expected, so we don't need to initialize it manually for npt_enabled anymore. Signed-off-by: Eduardo Habkost --- arch/x86/kvm/svm.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 6b86a11..cd32ea7 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -646,8 +646,6 @@ static void init_vmcb(struct vcpu_svm *svm) control->intercept_cr_write &= ~(INTERCEPT_CR0_MASK| INTERCEPT_CR3_MASK); save->g_pat = 0x0007040600070406ULL; - /* enable caching because the QEMU Bios doesn't enable it */ - save->cr0 = X86_CR0_ET; save->cr3 = 0; save->cr4 = 0; } -- 1.6.3.rc4.29.g8146