X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fmmu%2Fvmm_shdw_pg_kvm.c;h=c9557909bce03eb1e31d44075c2ec5627e7450a9;hb=3b0d98aaf40fd7a1bfc3bc736144386636cc7a73;hp=fee869cc7933ac430a359b40f41ae4f1ca21579d;hpb=fb16ffd793b51e356bd17a35b3929adbadd88e23;p=palacios.git diff --git a/palacios/src/palacios/mmu/vmm_shdw_pg_kvm.c b/palacios/src/palacios/mmu/vmm_shdw_pg_kvm.c index fee869c..c955790 100644 --- a/palacios/src/palacios/mmu/vmm_shdw_pg_kvm.c +++ b/palacios/src/palacios/mmu/vmm_shdw_pg_kvm.c @@ -1,20 +1,6 @@ /* - * 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 - * Copyright (c) 2008, The V3VEE Project - * All rights reserved. - * - * Author: Jack Lange - * - * This is free software. You are permitted to use, - * redistribute, and modify it as specified in the file "V3VEE_LICENSE". + * Shadow page cache implementation that has been stolen from Linux's KVM Implementation + * This module is licensed under the GPL */ #include @@ -26,12 +12,12 @@ #include -#ifndef CONFIG_DEBUG_SHDW_CACHE +#ifndef V3_CONFIG_DEBUG_SHDW_CACHE #undef PrintDebug #define PrintDebug(fmt, ...) #endif -#ifdef CONFIG_SHADOW_CACHE +#ifdef V3_CONFIG_SHADOW_CACHE struct pde_chain { addr_t shadow_pdes[NR_PTE_CHAIN_ENTRIES]; @@ -130,7 +116,7 @@ static void shadow_free_page (struct guest_info * core, struct shadow_page_cache { list_del(&page->link); - V3_FreePage((void *)page->page_pa); + V3_FreePages((void *)page->page_pa, 1); page->page_pa=(addr_t)V3_AllocPages(1); list_add(&page->link,&core->free_pages); @@ -177,7 +163,7 @@ static void free_shadow_pages(struct guest_info * core) while (!list_empty(&core->free_pages)) { page = list_entry(core->free_pages.next, struct shadow_page_cache_data, link); list_del(&page->link); - V3_FreePage((void *)page->page_pa); + V3_FreePages((void *)page->page_pa, 1); page->page_pa = ~(addr_t)0; //invalid address } }