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.


more 64 bit guest support
[palacios.git] / palacios / src / palacios / vm_guest.c
index ef025fa..5666fef 100644 (file)
@@ -44,13 +44,14 @@ v3_vm_cpu_mode_t v3_get_cpu_mode(struct guest_info * info) {
 
   if (cr0->pe == 0) {
     return REAL;
-  } else if ((cr4->pae == 0) && (efer->lma == 0)) {
+  } else if ((cr4->pae == 0) && (efer->lme == 0)) {
     return PROTECTED;
-  } else if (efer->lma == 0) {
+  } else if (efer->lme == 0) {
     return PROTECTED_PAE;
-  } else if ((efer->lma == 1) && (cs->long_mode == 1)) {
+  } else if ((efer->lme == 1) && (cs->long_mode == 1)) {
     return LONG;
   } else {
+    // What about LONG_16_COMPAT???
     return LONG_32_COMPAT;
   }
 }
@@ -91,7 +92,7 @@ void v3_print_segments(struct guest_info * info) {
   for (i = 0; seg_names[i] != NULL; i++) {
 
     PrintDebug("\t%s: Sel=%x, base=%p, limit=%x\n", seg_names[i], seg_ptr[i].selector, 
-              (void *)seg_ptr[i].base, seg_ptr[i].limit);
+              (void *)(addr_t)seg_ptr[i].base, seg_ptr[i].limit);
 
   }
 
@@ -110,10 +111,10 @@ void v3_print_ctrl_regs(struct guest_info * info) {
   PrintDebug("32 bit Ctrl Regs:\n");
 
   for (i = 0; reg_names[i] != NULL; i++) {
-    PrintDebug("\t%s=0x%p\n", reg_names[i], (void *)reg_ptr[i]);  
+    PrintDebug("\t%s=0x%p\n", reg_names[i], (void *)(addr_t)reg_ptr[i]);  
   }
 
-  PrintDebug("\tEFER=0x%p\n", (void*)(guest_state->efer));
+  PrintDebug("\tEFER=0x%p\n", (void*)(addr_t)(guest_state->efer));
 
 }
 
@@ -129,6 +130,6 @@ void v3_print_GPRs(struct guest_info * info) {
   PrintDebug("32 bit GPRs:\n");
 
   for (i = 0; reg_names[i] != NULL; i++) {
-    PrintDebug("\t%s=0x%p\n", reg_names[i], (void *)reg_ptr[i]);  
+    PrintDebug("\t%s=0x%p\n", reg_names[i], (void *)(addr_t)reg_ptr[i]);  
   }
 }