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.


VMX 64-bit guest support. Add exit handling for CR4 and EFER accesses.
[palacios.git] / palacios / src / palacios / vmx_handler.c
index 71c1eab..5af3122 100644 (file)
@@ -224,12 +224,22 @@ int v3_handle_vmx_exit(struct guest_info * info, struct vmx_exit_info * exit_inf
                        return -1;
                    }
                    break;
+               case 4:
+                   //PrintDebug("Handling CR4 Access\n");
+                   if (v3_vmx_handle_cr4_access(info, cr_qual) == -1) {
+                       PrintError("Error in CR4 access handler\n");
+                       return -1;
+                   }
+                   break;
                default:
                    PrintError("Unhandled CR access: %d\n", cr_qual->cr_id);
                    return -1;
            }
            
-           info->rip += exit_info->instr_len;
+           // TODO: move RIP increment into all of the above individual CR
+           //       handlers, not just v3_vmx_handle_cr4_access()
+           if (cr_qual->cr_id != 4)
+               info->rip += exit_info->instr_len;
 
            break;
        }