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.


removed outdated build environment
[palacios.git] / palacios / src / palacios / vmm_direct_paging.c
index f3ef009..6040e81 100644 (file)
@@ -49,33 +49,44 @@ int v3_init_passthrough_pts(struct guest_info * info) {
     return 0;
 }
 
-int v3_reset_passthrough_pts(struct guest_info * info) {
-    v3_cpu_mode_t mode = v3_get_vm_cpu_mode(info);
+
+int v3_free_passthrough_pts(struct guest_info * core) {
+    v3_cpu_mode_t mode = v3_get_vm_cpu_mode(core);
 
     // Delete the old direct map page tables
     switch(mode) {
        case REAL:
        case PROTECTED:
-           delete_page_tables_32((pde32_t *)V3_VAddr((void *)(info->direct_map_pt)));
+           delete_page_tables_32((pde32_t *)V3_VAddr((void *)(core->direct_map_pt)));
            break;
        case PROTECTED_PAE:
        case LONG:
        case LONG_32_COMPAT:
            // Long mode will only use 32PAE page tables...
-           delete_page_tables_32pae((pdpe32pae_t *)V3_VAddr((void *)(info->direct_map_pt)));
+           delete_page_tables_32pae((pdpe32pae_t *)V3_VAddr((void *)(core->direct_map_pt)));
            break;
        default:
            PrintError("Unknown CPU Mode\n");
+           return -1;
            break;
     }
-           
+
+    return 0;
+}
+
+
+int v3_reset_passthrough_pts(struct guest_info * core) {
+
+    v3_free_passthrough_pts(core);
+
     // create new direct map page table
-    v3_init_passthrough_pts(info);
+    v3_init_passthrough_pts(core);
     
     return 0;
 }
 
 
+
 int v3_activate_passthrough_pt(struct guest_info * info) {
     // For now... But we need to change this....
     // As soon as shadow paging becomes active the passthrough tables are hosed