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.


changed shadow memory map to use Red Black Tree
[palacios.git] / palacios / src / palacios / vmm_paging.c
index 271ee3f..1a7dc7b 100644 (file)
@@ -669,7 +669,6 @@ pt_access_status_t inline v3_can_access_pte64(pte64_t * pte, addr_t addr, pf_err
 pde32_t * create_passthrough_pts_32(struct guest_info * guest_info) {
   addr_t current_page_addr = 0;
   int i, j;
-  struct shadow_map * map = &(guest_info->mem_map);
 
   pde32_t * pde = V3_VAddr(V3_AllocPages(1));
 
@@ -679,11 +678,10 @@ pde32_t * create_passthrough_pts_32(struct guest_info * guest_info) {
     
 
     for (j = 0; j < MAX_PTE32_ENTRIES; j++) {
-      struct shadow_region * region = get_shadow_region_by_addr(map, current_page_addr);
+      struct v3_shadow_region * region =  v3_get_shadow_region(guest_info, current_page_addr);
 
       if (!region || 
-         (region->host_type == SHDW_REGION_FULL_HOOK) || 
-         (region->host_type == SHDW_REGION_UNALLOCATED)) {
+         (region->host_type == SHDW_REGION_FULL_HOOK)) {
        pte[j].present = 0;
        pte[j].writable = 0;
        pte[j].user_page = 0;
@@ -770,7 +768,6 @@ pde32_t * create_passthrough_pts_32(struct guest_info * guest_info) {
 pdpe32pae_t * create_passthrough_pts_32PAE(struct guest_info * guest_info) {
   addr_t current_page_addr = 0;
   int i, j, k;
-  struct shadow_map * map = &(guest_info->mem_map);
 
   pdpe32pae_t * pdpe = V3_VAddr(V3_AllocPages(1));
   memset(pdpe, 0, PAGE_SIZE);
@@ -787,11 +784,10 @@ pdpe32pae_t * create_passthrough_pts_32PAE(struct guest_info * guest_info) {
       
       
       for (k = 0; k < MAX_PTE32PAE_ENTRIES; k++) {
-       struct shadow_region * region = get_shadow_region_by_addr(map, current_page_addr);
+       struct v3_shadow_region * region = v3_get_shadow_region(guest_info, current_page_addr);
        
        if (!region || 
-           (region->host_type == SHDW_REGION_FULL_HOOK) || 
-           (region->host_type == SHDW_REGION_UNALLOCATED)) {
+           (region->host_type == SHDW_REGION_FULL_HOOK)) {
          pte[k].present = 0;
          pte[k].writable = 0;
          pte[k].user_page = 0;
@@ -912,7 +908,6 @@ pdpe32pae_t * create_passthrough_pts_32PAE(struct guest_info * guest_info) {
 pml4e64_t * create_passthrough_pts_64(struct guest_info * info) {
   addr_t current_page_addr = 0;
   int i, j, k, m;
-  struct shadow_map * map = &(info->mem_map);
   
   pml4e64_t * pml = V3_VAddr(V3_AllocPages(1));
 
@@ -930,13 +925,12 @@ pml4e64_t * create_passthrough_pts_64(struct guest_info * info) {
 
 
        for (m = 0; m < MAX_PTE64_ENTRIES; m++) {
-         struct shadow_region * region = get_shadow_region_by_addr(map, current_page_addr);
+         struct v3_shadow_region * region = v3_get_shadow_region(info, current_page_addr);
          
 
          
          if (!region || 
-             (region->host_type == SHDW_REGION_FULL_HOOK) || 
-             (region->host_type == SHDW_REGION_UNALLOCATED)) {
+             (region->host_type == SHDW_REGION_FULL_HOOK)) {
            pte[m].present = 0;
            pte[m].writable = 0;
            pte[m].user_page = 0;