X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_emulator.c;h=73c2cc70ee3fe8acaae168efab042d0de94b244a;hb=6593ee3c311ec87304c7bed52a9e6034338679fb;hp=3fedc517951140aab01d13d124d33fb2b35bedd3;hpb=c373d9a80b116014c546e7761982fedf7419664b;p=palacios.releases.git diff --git a/palacios/src/palacios/vmm_emulator.c b/palacios/src/palacios/vmm_emulator.c index 3fedc51..73c2cc7 100644 --- a/palacios/src/palacios/vmm_emulator.c +++ b/palacios/src/palacios/vmm_emulator.c @@ -1,3 +1,22 @@ +/* + * 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 @@ -210,14 +229,20 @@ int v3_emulate_memory_write(struct guest_info * info, addr_t write_gva, struct emulated_page * data_page = V3_Malloc(sizeof(struct emulated_page)); addr_t data_addr_offset = PT32_PAGE_OFFSET(write_gva); pte32_t saved_pte; + int i; - PrintDebug("Emulating Write\n"); + PrintDebug("Emulating Write for instruction at 0x%x\n",info->rip); if (info->mem_mode == PHYSICAL_MEM) { ret = read_guest_pa_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr); } else { ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr); } + + + PrintDebug("Instruction is"); + for (i=0;i<15;i++) { PrintDebug(" 0x%x",instr[i]); } + PrintDebug("\n"); if (v3_basic_mem_decode(info, (addr_t)instr, &instr_info) == -1) { PrintError("Could not do a basic memory instruction decode\n"); @@ -226,6 +251,10 @@ int v3_emulate_memory_write(struct guest_info * info, addr_t write_gva, return -1; } + if (instr_info.has_rep==1) { + PrintDebug("Emulated instruction has rep\n"); + } + /* if (instr_info.has_rep == 1) { PrintError("We currently don't handle rep* instructions\n");