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.


Merge branch 'kitten' of ssh://sharedev@newskysaw.cs.northwestern.edu/home/sharedev...
Jack Lange [Wed, 22 Oct 2008 22:12:55 +0000 (17:12 -0500)]
palacios/src/palacios/svm.c

index 95bb586..77653af 100644 (file)
@@ -59,7 +59,7 @@ static vmcb_t * Allocate_VMCB() {
 
 
 
-
+#include <palacios/vmm_ctrl_regs.h>
 
 static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) {
   vmcb_ctrl_t * ctrl_area = GET_VMCB_CTRL_AREA(vmcb);
@@ -77,7 +77,21 @@ static void Init_VMCB_BIOS(vmcb_t * vmcb, struct guest_info *vm_info) {
   ctrl_area->cr_reads.cr0 = 1;
   ctrl_area->cr_writes.cr0 = 1;
 
+
+  /* Set up the efer to enable 64 bit page tables */
+  {
+    struct efer_64 * efer = (struct efer_64 *)&(guest_state->efer);
+    struct cr4_32 * cr4 = (struct cr4_32 *)&(guest_state->cr4);
+    efer->lma = 1;
+    efer->lme = 1;
+
+    cr4->pae = 1;
+  }
+
   guest_state->efer |= EFER_MSR_svm_enable;
+
+
+
   guest_state->rflags = 0x00000002; // The reserved bit is always 1
   ctrl_area->svm_instrs.VMRUN = 1;
   ctrl_area->svm_instrs.VMMCALL = 1;