-/* Northwestern University */
-/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+/*
+ * 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 <jarusl@cs.northwestern.edu>
+ * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
+ * All rights reserved.
+ *
+ * Author: Jack Lange <jarusl@cs.northwestern.edu>
+ *
+ * This is free software. You are permitted to use,
+ * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
+ */
#include <palacios/vm_guest_mem.h>
#include <palacios/vmm.h>
#include <palacios/vmm_paging.h>
-extern struct vmm_os_hooks * os_hooks;
+extern struct v3_os_hooks * os_hooks;
/**********************************/
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) {
/* 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;
/* 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;
/* 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;