Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


added initial memory hook support, still need decoder
[palacios.git] / palacios / src / palacios / vmm_ctrl_regs.c
index 8f7f6fc..fba6004 100644 (file)
@@ -106,7 +106,8 @@ int handle_cr0_write(struct guest_info * info) {
     } else if ((instr[index] == cr_access_byte) && 
               (instr[index + 1] == clts_byte)) {
       // CLTS
-
+      PrintDebug("CLTS unhandled\n");
+      return -1;
 
     } else if ((instr[index] == cr_access_byte) && 
               (instr[index + 1] = mov_to_cr_byte)) {
@@ -449,6 +450,8 @@ int handle_cr3_write(struct guest_info * info) {
        struct cr3_32 * shadow_cr3 = (struct cr3_32 *)&(info->shdw_pg_state.shadow_cr3);
        struct cr3_32 * guest_cr3 = (struct cr3_32 *)&(info->shdw_pg_state.guest_cr3);
 
+       /* Delete the current Page Tables */
+       delete_page_tables_pde32((pde32_t *)CR3_TO_PDE32(shadow_cr3));
 
        *guest_cr3 = *new_cr3;
 
@@ -456,6 +459,7 @@ int handle_cr3_write(struct guest_info * info) {
        shadow_pt =  create_new_shadow_pt32(info);
        //shadow_pt = setup_shadow_pt32(info, CR3_TO_PDE32(*(addr_t *)new_cr3));
 
+
        /* Copy Various flags */
        *shadow_cr3 = *new_cr3;