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.


revert to earlier rdtsc intercepts
Jack Lange [Fri, 27 Jul 2012 18:39:17 +0000 (14:39 -0400)]
palacios/src/palacios/svm.c
palacios/src/palacios/svm_handler.c

index 3db11ce..996ed2b 100644 (file)
@@ -537,7 +537,14 @@ int
 v3_svm_config_tsc_virtualization(struct guest_info * info) {
     vmcb_ctrl_t * ctrl_area = GET_VMCB_CTRL_AREA((vmcb_t*)(info->vmm_data));
 
-    if (!(info->time_state.flags & VM_TIME_TRAP_RDTSC)) {
+
+    if (info->time_state.flags & VM_TIME_TRAP_RDTSC) {
+       ctrl_area->instrs.RDTSC = 1;
+       ctrl_area->svm_instrs.RDTSCP = 1;
+    } else {
+       ctrl_area->instrs.RDTSC = 0;
+       ctrl_area->svm_instrs.RDTSCP = 0;
+
        if (info->time_state.flags & VM_TIME_TSC_PASSTHROUGH) {
                ctrl_area->TSC_OFFSET = 0;
        } else {
index b270907..14f4454 100644 (file)
@@ -256,7 +256,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
 #ifdef V3_CONFIG_DEBUG_TIME
            PrintDebug("RDTSC/RDTSCP\n");
 #endif 
-           if (v3_dispatch_exit_hook(info, V3_EXIT_RDTSC, NULL) == -1) {
+           if (v3_handle_rdtsc(info) == -1) {
                PrintError("Error Handling RDTSC instruction\n");
                return -1;
            }
@@ -265,7 +265,7 @@ int v3_handle_svm_exit(struct guest_info * info, addr_t exit_code, addr_t exit_i
 #ifdef V3_CONFIG_DEBUG_TIME
            PrintDebug("RDTSCP\n");
 #endif 
-           if (v3_dispatch_exit_hook(info, V3_EXIT_RDTSCP, NULL) == -1) {
+           if (v3_handle_rdtscp(info) == -1) {
                PrintError("Error handling RDTSCP instruction\n");
                return -1;
            }