diff options
-rw-r--r-- | arch/x86/kvm/svm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ffa6ad216b71..c9ef6c0e1e98 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -628,11 +628,12 @@ static void init_vmcb(struct vcpu_svm *svm) | |||
628 | save->rip = 0x0000fff0; | 628 | save->rip = 0x0000fff0; |
629 | svm->vcpu.arch.regs[VCPU_REGS_RIP] = save->rip; | 629 | svm->vcpu.arch.regs[VCPU_REGS_RIP] = save->rip; |
630 | 630 | ||
631 | /* | 631 | /* This is the guest-visible cr0 value. |
632 | * cr0 val on cpu init should be 0x60000010, we enable cpu | 632 | * svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0. |
633 | * cache by default. the orderly way is to enable cache in bios. | ||
634 | */ | 633 | */ |
635 | save->cr0 = 0x00000010 | X86_CR0_PG | X86_CR0_WP; | 634 | svm->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET; |
635 | kvm_set_cr0(&svm->vcpu, svm->vcpu.arch.cr0); | ||
636 | |||
636 | save->cr4 = X86_CR4_PAE; | 637 | save->cr4 = X86_CR4_PAE; |
637 | /* rdx = ?? */ | 638 | /* rdx = ?? */ |
638 | 639 | ||