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.


Add interface for power monitoring and telemetry option for power-related statistics
[palacios.git] / palacios / src / palacios / vmx.c
index 6fd1f8d..2741051 100644 (file)
@@ -1027,6 +1027,10 @@ int v3_vmx_enter(struct guest_info * info) {
        uint64_t entry_tsc = 0;
        uint64_t exit_tsc = 0;
 
+#ifdef V3_CONFIG_PWRSTAT_TELEMETRY
+       v3_pwrstat_telemetry_enter(info);
+#endif
+
 #ifdef V3_CONFIG_PMU_TELEMETRY
        v3_pmu_telemetry_enter(info);
 #endif
@@ -1049,6 +1053,10 @@ int v3_vmx_enter(struct guest_info * info) {
 #ifdef V3_CONFIG_PMU_TELEMETRY
        v3_pmu_telemetry_exit(info);
 #endif
+
+#ifdef V3_CONFIG_PWRSTAT_TELEMETRY
+       v3_pwrstat_telemetry_exit(info);
+#endif
     }
 
     //  PrintDebug(info->vm_info, info, "VMX Exit: ret=%d\n", ret);
@@ -1202,6 +1210,10 @@ int v3_start_vmx_guest(struct guest_info * info) {
     v3_pmu_telemetry_start(info);
 #endif
 
+#ifdef V3_CONFIG_PWRSTAT_TELEMETRY
+    v3_pwrstat_telemetry_start(info);
+#endif
+
     while (1) {
 
        if (info->vm_info->run_state == VM_STOPPED) {
@@ -1262,6 +1274,10 @@ int v3_start_vmx_guest(struct guest_info * info) {
     v3_pmu_telemetry_end(info);
 #endif
 
+#ifdef V3_CONFIG_PWRSTAT_TELEMETRY
+    v3_pwrstat_telemetry_end(info);
+#endif
+
     return 0;
 }