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.


Device manager updated with extended save/load model to facilitate devices that need...
[palacios.releases.git] / palacios / src / palacios / vmx_ctrl_regs.c
index 01c5dfe..0f10f7e 100644 (file)
@@ -100,6 +100,28 @@ int v3_vmx_handle_cr4_access(struct guest_info * info, struct vmx_exit_cr_qual *
     return -1;
 }
 
+int v3_vmx_handle_cr8_access(struct guest_info * info, struct vmx_exit_cr_qual * cr_qual) {
+    if (cr_qual->access_type < 2) {
+
+       if (cr_qual->access_type == 0) {
+           if (v3_handle_cr8_write(info) != 0) {
+               PrintError("Could not handle CR8 write\n");
+               return -1;
+           }
+       } else {
+           if (v3_handle_cr8_read(info) != 0) {
+               PrintError("Could not handle CR8 read\n");
+               return -1;
+           }
+       }
+       
+       return 0;
+    }
+    
+    PrintError("Invalid CR8 Access type?? (type=%d)\n", cr_qual->access_type);
+    return -1;
+}
+
 static int handle_mov_to_cr3(struct guest_info * info, v3_reg_t * cr3_reg) {
 
     if (info->shdw_pg_mode == SHADOW_PAGING) {
@@ -224,6 +246,8 @@ static int handle_mov_to_cr0(struct guest_info * info, v3_reg_t * new_cr0, struc
            //    *(uint32_t *)shdw_cr0 = (0x00000020 & *(uint32_t *)new_shdw_cr0);
 
            *guest_cr0 = *new_shdw_cr0;
+
+           guest_cr0->cd = 0;
        }
 
        guest_cr0->ne = 1;