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.


updated to 64 bits based on the wrong f#@$%ing trunk
[palacios.git] / palacios / src / palacios / vmm_shadow_paging.c
index 05d913d..54347e3 100644 (file)
@@ -1,5 +1,21 @@
-/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
-/* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
+/* 
+ * 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/vmm_shadow_paging.h>
@@ -185,7 +201,7 @@ int v3_replace_shdw_page32(struct guest_info * info, addr_t location, pte32_t *
   pde32_t * shadow_pde =  (pde32_t *)&(shadow_pd[PDE32_INDEX(location)]);
 
   if (shadow_pde->large_page == 0) {
-    pte32_t * shadow_pt = (pte32_t *)PDE32_T_ADDR((*shadow_pde));
+    pte32_t * shadow_pt = (pte32_t *)(addr_t)PDE32_T_ADDR((*shadow_pde));
     pte32_t * shadow_pte = (pte32_t *)&(shadow_pt[PTE32_INDEX(location)]);
 
     //if (shadow_pte->present == 1) {
@@ -420,7 +436,7 @@ static int handle_shadow_pagefault32(struct guest_info * info, addr_t fault_addr
       
       guest_pde->accessed = 1;
       
-      shadow_pde->pt_base_addr = PD32_BASE_ADDR(shadow_pt);
+      shadow_pde->pt_base_addr = PD32_BASE_ADDR((addr_t)shadow_pt);
       
       if (guest_pde->large_page == 0) {
        shadow_pde->writable = guest_pde->writable;
@@ -434,7 +450,7 @@ static int handle_shadow_pagefault32(struct guest_info * info, addr_t fault_addr
       //
       // PTE fault
       //
-      pte32_t * shadow_pt = (pte32_t *)PDE32_T_ADDR((*shadow_pde));
+      pte32_t * shadow_pt = (pte32_t *)(addr_t)PDE32_T_ADDR((*shadow_pde));
 
       if (guest_pde->large_page == 0) {
        pte32_t * guest_pt = NULL;
@@ -658,7 +674,7 @@ int handle_shadow_invlpg(struct guest_info * info) {
 
 
   if (info->cpu_mode == PROTECTED) {
-    char instr[15];
+    uchar_t instr[15];
     int ret;
     int index = 0;
 
@@ -715,7 +731,7 @@ int handle_shadow_invlpg(struct guest_info * info) {
        } else {
         
          if (shadow_pde->present == 1) {
-           pte32_t * shadow_pt = (pte32_t *)PDE32_T_ADDR((*shadow_pde));
+           pte32_t * shadow_pt = (pte32_t *)(addr_t)PDE32_T_ADDR((*shadow_pde));
            pte32_t * shadow_pte = (pte32_t *)&shadow_pt[PTE32_INDEX(first_operand)];
 
 #ifdef DEBUG_SHADOW_PAGING