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.


Generalization of constraints on page allocation and implementation/use
[palacios.git] / palacios / src / palacios / mmu / vmm_shdw_pg_tlb.c
index d0c02de..d6f77d8 100644 (file)
@@ -54,13 +54,6 @@ static struct shadow_page_data * create_new_shadow_pt(struct guest_info * core);
 #include "vmm_shdw_pg_tlb_32pae.h"
 #include "vmm_shdw_pg_tlb_64.h"
 
-static inline int get_constraints(struct guest_info *core) 
-{
-  // the current version of VTLB does not require any constraints
-  // on where page tables are allocated since it will use
-  // 32PAE page tables on a 64 bit machine even in 32 bit mode and below
-  return 0;  
-}
 
 
 static struct shadow_page_data * create_new_shadow_pt(struct guest_info * core) {
@@ -98,7 +91,7 @@ static struct shadow_page_data * create_new_shadow_pt(struct guest_info * core)
        return NULL;
     }
 
-    page_tail->page_pa = (addr_t)V3_AllocPagesExtended(1,PAGE_SIZE_4KB,-1,get_constraints(core));
+    page_tail->page_pa = (addr_t)V3_AllocPagesExtended(1,PAGE_SIZE_4KB,-1,0,0);
 
     if (!page_tail->page_pa) {
        PrintError(core->vm_info, core, "Cannot allocate page\n");
@@ -225,15 +218,19 @@ static int vtlb_handle_invlpg(struct guest_info * core, addr_t vaddr) {
     switch (v3_get_vm_cpu_mode(core)) {
        case PROTECTED:
            return handle_shadow_invlpg_32(core, vaddr);
+           break;
        case PROTECTED_PAE:
            return handle_shadow_invlpg_32pae(core, vaddr);
+           break;
        case LONG:
        case LONG_32_COMPAT:
        case LONG_16_COMPAT:
            return handle_shadow_invlpg_64(core, vaddr);
+           break;
        default:
            PrintError(core->vm_info, core, "Invalid CPU mode: %s\n", v3_cpu_mode_to_str(v3_get_vm_cpu_mode(core)));
            return -1;
+           break;
     }
 }