public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Subject: [PATCH 3/3] kvm: svm: init_vmcb(): remove redundant save->cr0 initialization
Date: Sat, 24 Oct 2009 02:50:00 -0200	[thread overview]
Message-ID: <1256359800-16893-4-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1256359800-16893-1-git-send-email-ehabkost@redhat.com>

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 <ehabkost@redhat.com>
---
 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


  parent reply	other threads:[~2009-10-24  4:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-24  4:49 [PATCH 0/3] kvm: fix cr0 initialization on SIPI reset Eduardo Habkost
2009-10-24  4:49 ` [PATCH 1/3] kvm: vmx: use macros instead of hex value on cr0 initialization Eduardo Habkost
2009-10-24  4:49 ` [PATCH 2/3] kvm: svm: reset cr0 properly on vcpu reset Eduardo Habkost
2010-03-17 18:17   ` Alexander Graf
2010-03-17 21:42     ` Eduardo Habkost
2010-03-17 21:48       ` Alexander Graf
2010-03-19 14:51         ` Eduardo Habkost
2010-03-19 15:14           ` Alexander Graf
2009-10-24  4:50 ` Eduardo Habkost [this message]
2009-10-25  9:40 ` [PATCH 0/3] kvm: fix cr0 initialization on SIPI reset Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1256359800-16893-4-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox