X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_ctrl_regs.c;h=26272cc9cbf2170acec41b9fb1d893eb4e8f3405;hb=56f8088296ee4116a4811a2f4f843edd80a7748d;hp=4575f9951f51c95e97dddabac944cfcf5cf98baa;hpb=f84bd0ca67af7c0a1143d5e279e0af408729128e;p=palacios.git diff --git a/palacios/src/palacios/vmm_ctrl_regs.c b/palacios/src/palacios/vmm_ctrl_regs.c index 4575f99..26272cc 100644 --- a/palacios/src/palacios/vmm_ctrl_regs.c +++ b/palacios/src/palacios/vmm_ctrl_regs.c @@ -1,3 +1,7 @@ +/* (c) 2008, Jack Lange */ +/* (c) 2008, The V3VEE Project */ + + #include #include #include @@ -20,9 +24,6 @@ #endif - - - // First Attempt = 494 lines // current = 106 lines int handle_cr0_write(struct guest_info * info) { @@ -202,7 +203,7 @@ int handle_cr0_read(struct guest_info * info) { -// First Attemp = 256 lines +// First Attempt = 256 lines // current = 65 lines int handle_cr3_write(struct guest_info * info) { int ret; @@ -246,14 +247,12 @@ int handle_cr3_write(struct guest_info * info) { cached = cache_page_tables32(info, CR3_TO_PDE32(*(addr_t *)new_cr3)); + if (cached == -1) { PrintError("CR3 Cache failed\n"); return -1; } else if (cached == 0) { - - addr_t shadow_pt; - PrintDebug("New CR3 is different - flushing shadow page table\n"); @@ -334,12 +333,7 @@ int handle_cr3_read(struct guest_info * info) { return -1; } - info->rip += dec_instr.instr_length; return 0; } - - - -