Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172317
b: refs/heads/master
c: 18fa000
h: refs/heads/master
i:
  172315: 697370b
v: v3
  • Loading branch information
Eduardo Habkost authored and Avi Kivity committed Dec 3, 2009
1 parent 6819ddd commit 732fdc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa40052ca04bdbbeb20b839cc8ffe9fa7beefbe9
refs/heads/master: 18fa000ae453767b59ab97477925895a3f0c46ea
9 changes: 5 additions & 4 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,12 @@ static void init_vmcb(struct vcpu_svm *svm)
save->rip = 0x0000fff0;
svm->vcpu.arch.regs[VCPU_REGS_RIP] = save->rip;

/*
* cr0 val on cpu init should be 0x60000010, we enable cpu
* cache by default. the orderly way is to enable cache in bios.
/* This is the guest-visible cr0 value.
* svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0.
*/
save->cr0 = 0x00000010 | X86_CR0_PG | X86_CR0_WP;
svm->vcpu.arch.cr0 = X86_CR0_NW | X86_CR0_CD | X86_CR0_ET;
kvm_set_cr0(&svm->vcpu, svm->vcpu.arch.cr0);

save->cr4 = X86_CR4_PAE;
/* rdx = ?? */

Expand Down

0 comments on commit 732fdc4

Please sign in to comment.