Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Convert shadow paging to use 32 PAE (VMX)
[palacios.git] / palacios / src / palacios / vmx_assist.c
index 3e1f7a7..fa67d97 100644 (file)
@@ -248,10 +248,10 @@ int v3_vmxassist_init(struct guest_info * core, struct vmx_data * vmx_state) {
     core->vm_regs.rsp = 0x80000;
     ((struct rflags *)&(core->ctrl_regs.rflags))->rsvd1 = 1;
 
-#define GUEST_CR0 0x80010031
-#define GUEST_CR4 0x00002010
-    core->ctrl_regs.cr0 = GUEST_CR0;
-    core->ctrl_regs.cr4 = GUEST_CR4;
+#define GUEST_CR0_MASK 0x80010031
+#define GUEST_CR4_MASK 0x00002010
+    core->ctrl_regs.cr0 |= GUEST_CR0_MASK;
+    core->ctrl_regs.cr4 |= GUEST_CR4_MASK;
 
     ((struct cr0_32 *)&(core->shdw_pg_state.guest_cr0))->pe = 1;
     ((struct cr0_32 *)&(core->shdw_pg_state.guest_cr0))->wp = 1;