aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-08-31 18:13:13 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:51:50 -0400
commit678041ad9dc82eedc598f709e8a3d620139d4105 (patch)
treebdc9aa2e3b1f5f7d7bae80d7ea9e1fa995b8bad3 /arch
parentc41a15dd4632499b9c1a00871e160276999767d9 (diff)
KVM: SVM: reset mmu context in init_vmcb
Since commit aad827034e419fa no mmu reinitialization is performed via init_vmcb. Zero vcpu->arch.cr0 and pass the reset value as a parameter to kvm_set_cr0. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/svm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ff28f6521065..60bc1e53d237 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -827,8 +827,8 @@ static void init_vmcb(struct vcpu_svm *svm)
827 * This is the guest-visible cr0 value. 827 * This is the guest-visible cr0 value.
828 * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0. 828 * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0.
829 */ 829 */
830 svm->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET; 830 svm->vcpu.arch.cr0 = 0;
831 (void)kvm_set_cr0(&svm->vcpu, svm->vcpu.arch.cr0); 831 (void)kvm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET);
832 832
833 save->cr4 = X86_CR4_PAE; 833 save->cr4 = X86_CR4_PAE;
834 /* rdx = ?? */ 834 /* rdx = ?? */