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.


Graceful teardown of seabios fw config and fix of memory leak
[palacios.releases.git] / palacios / src / palacios / vmm_direct_paging.c
index 92601c4..5f5be4c 100644 (file)
 #endif
 
 
-static addr_t create_generic_pt_page() {
+static addr_t create_generic_pt_page(struct guest_info *core) {
     void * page = 0;
     void *temp;
 
-    temp = V3_AllocPages(1);
+    temp = V3_AllocPagesExtended(1, PAGE_SIZE_4KB, -1, 
+                                core->shdw_pg_mode==SHADOW_PAGING ? V3_ALLOC_PAGES_CONSTRAINT_4GB : 0);
     if (!temp) { 
        PrintError(VM_NONE, VCORE_NONE,"Cannot allocate page\n");
        return 0;
@@ -53,7 +54,7 @@ static addr_t create_generic_pt_page() {
 #include "vmm_direct_paging_64.h"
 
 int v3_init_passthrough_pts(struct guest_info * info) {
-    info->direct_map_pt = (addr_t)V3_PAddr((void *)create_generic_pt_page());
+    info->direct_map_pt = (addr_t)V3_PAddr((void *)create_generic_pt_page(info));
     return 0;
 }