X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvm_guest_mem.c;h=51393d61c97d6c4791f9ebe69476006b313f7b6c;hb=a2b7cc4f2d739213d1edefb85ff941c41c86907b;hp=07679bdb20014aa7095516c9c3f3649f90c6dd6c;hpb=4f7c3b759e3889870c5b5e7d09b3ffcc168e5632;p=palacios.releases.git diff --git a/palacios/src/palacios/vm_guest_mem.c b/palacios/src/palacios/vm_guest_mem.c index 07679bd..51393d6 100644 --- a/palacios/src/palacios/vm_guest_mem.c +++ b/palacios/src/palacios/vm_guest_mem.c @@ -1,11 +1,27 @@ -/* Northwestern University */ -/* (c) 2008, Jack Lange */ +/* + * 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". + */ #include #include #include -extern struct vmm_os_hooks * os_hooks; +extern struct v3_os_hooks * os_hooks; /**********************************/ @@ -135,9 +151,9 @@ int guest_va_to_guest_pa(struct guest_info * guest_info, addr_t guest_va, addr_t addr_t guest_pde = 0; if (guest_info->shdw_pg_mode == SHADOW_PAGING) { - guest_pde = CR3_TO_PDE32(guest_info->shdw_pg_state.guest_cr3); + guest_pde = (addr_t)CR3_TO_PDE32((void *)(guest_info->shdw_pg_state.guest_cr3)); } else if (guest_info->shdw_pg_mode == NESTED_PAGING) { - guest_pde = CR3_TO_PDE32(guest_info->ctrl_regs.cr3); + guest_pde = (addr_t)CR3_TO_PDE32((void *)(guest_info->ctrl_regs.cr3)); } if (guest_pa_to_host_va(guest_info, guest_pde, (addr_t *)&pde) == -1) { @@ -311,7 +327,7 @@ int host_va_to_guest_va(struct guest_info * guest_info, addr_t host_va, addr_t * /* This is a straight address conversion + copy, * except for the tiny little issue of crossing page boundries..... */ -int read_guest_va_memory(struct guest_info * guest_info, addr_t guest_va, int count, char * dest) { +int read_guest_va_memory(struct guest_info * guest_info, addr_t guest_va, int count, uchar_t * dest) { addr_t cursor = guest_va; int bytes_read = 0; @@ -348,7 +364,7 @@ int read_guest_va_memory(struct guest_info * guest_info, addr_t guest_va, int co /* This is a straight address conversion + copy, * except for the tiny little issue of crossing page boundries..... */ -int read_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int count, char * dest) { +int read_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int count, uchar_t * dest) { addr_t cursor = guest_pa; int bytes_read = 0; @@ -384,7 +400,7 @@ int read_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int co /* This is a straight address conversion + copy, * except for the tiny little issue of crossing page boundries..... */ -int write_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int count, char * src) { +int write_guest_pa_memory(struct guest_info * guest_info, addr_t guest_pa, int count, uchar_t * src) { addr_t cursor = guest_pa; int bytes_written = 0;