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.


fixed all the printf style warnings/errors
[palacios.git] / palacios / src / palacios / vm_guest.c
index 5dcf707..5b7c39f 100644 (file)
@@ -1,12 +1,31 @@
-/* Northwestern University */
-/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+/* 
+ * This file is part of the Palacios Virtual Machine Monitor developed
+ * by the V3VEE Project with funding from the United States National 
+ * Science Foundation and the Department of Energy.  
+ *
+ * The V3VEE Project is a joint project between Northwestern University
+ * and the University of New Mexico.  You can find out more at 
+ * http://www.v3vee.org
+ *
+ * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> 
+ * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org> 
+ * All rights reserved.
+ *
+ * Author: Jack Lange <jarusl@cs.northwestern.edu>
+ *
+ * This is free software.  You are permitted to use,
+ * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
+ */
+
+
+
 
 #include <palacios/vm_guest.h>
 #include <palacios/vmm_ctrl_regs.h>
 #include <palacios/vmm.h>
 
 
-vm_cpu_mode_t get_cpu_mode(struct guest_info * info) {
+v3_vm_cpu_mode_t v3_get_cpu_mode(struct guest_info * info) {
   struct cr0_32 * cr0;
   struct cr4_32 * cr4 = (struct cr4_32 *)&(info->ctrl_regs.cr4);
   struct efer_64 * efer = (struct efer_64 *)&(info->ctrl_regs.efer);
@@ -35,7 +54,7 @@ vm_cpu_mode_t get_cpu_mode(struct guest_info * info) {
   }
 }
 
-vm_mem_mode_t get_mem_mode(struct guest_info * info) {
+v3_vm_mem_mode_t v3_get_mem_mode(struct guest_info * info) {
   struct cr0_32 * cr0;
 
   if (info->shdw_pg_mode == SHADOW_PAGING) {
@@ -58,7 +77,7 @@ vm_mem_mode_t get_mem_mode(struct guest_info * info) {
 }
 
 
-void PrintV3Segments(struct guest_info * info) {
+void v3_print_segments(struct guest_info * info) {
   struct v3_segments * segs = &(info->segments);
   int i = 0;
   struct v3_segment * seg_ptr;
@@ -70,14 +89,15 @@ void PrintV3Segments(struct guest_info * info) {
 
   for (i = 0; seg_names[i] != NULL; i++) {
 
-    PrintDebug("\t%s: Sel=%x, base=%x, limit=%x\n", seg_names[i], seg_ptr[i].selector, seg_ptr[i].base, seg_ptr[i].limit);
+    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 PrintV3CtrlRegs(struct guest_info * info) {
+void v3_print_ctrl_regs(struct guest_info * info) {
   struct v3_ctrl_regs * regs = &(info->ctrl_regs);
   int i = 0;
   v3_reg_t * reg_ptr;
@@ -88,12 +108,12 @@ void PrintV3CtrlRegs(struct guest_info * info) {
   PrintDebug("32 bit Ctrl Regs:\n");
 
   for (i = 0; reg_names[i] != NULL; i++) {
-    PrintDebug("\t%s=0x%x\n", reg_names[i], reg_ptr[i]);  
+    PrintDebug("\t%s=0x%p\n", reg_names[i], (void *)reg_ptr[i]);  
   }
 }
 
 
-void PrintV3GPRs(struct guest_info * info) {
+void v3_print_GPRs(struct guest_info * info) {
   struct v3_gprs * regs = &(info->vm_regs);
   int i = 0;
   v3_reg_t * reg_ptr;
@@ -104,6 +124,6 @@ void PrintV3GPRs(struct guest_info * info) {
   PrintDebug("32 bit GPRs:\n");
 
   for (i = 0; reg_names[i] != NULL; i++) {
-    PrintDebug("\t%s=0x%x\n", reg_names[i], reg_ptr[i]);  
+    PrintDebug("\t%s=0x%p\n", reg_names[i], (void *)reg_ptr[i]);  
   }
 }