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.


Minor debugging print changes/fixups
Patrick G. Bridges [Wed, 10 Nov 2010 15:57:14 +0000 (08:57 -0700)]
palacios/src/devices/apic.c
palacios/src/palacios/svm.c
palacios/src/palacios/vm_guest.c
palacios/src/palacios/vmm_util.c

index c051bc8..b8e2fef 100644 (file)
@@ -705,7 +705,6 @@ static int route_ipi(struct apic_dev_state * apic_dev,
               icr->dst,
               icr->val);
 
-
     switch (icr->dst_shorthand) {
 
        case 0:  // no shorthand
@@ -1065,8 +1064,8 @@ static int apic_write(struct guest_info * core, addr_t guest_addr, void * src, u
     PrintDebug("apic %u: core %u: at %p and priv_data is at %p\n",
               apic->lapic_id.val, core->cpu_id, apic, priv_data);
 
-    PrintDebug("Write to address space (%p) (val=%x)\n", 
-              (void *)guest_addr, *(uint32_t *)src);
+    PrintDebug("apic %u: core %u: write to address space (%p) (val=%x)\n", 
+              apic->lapic_id.val, core->cpu_id, (void *)guest_addr, *(uint32_t *)src);
 
     if (msr->apic_enable == 0) {
        PrintError("apic %u: core %u: Write to APIC address space with disabled APIC, apic msr=0x%llx\n",
index a1fad8d..a88ff0e 100644 (file)
@@ -427,6 +427,9 @@ int v3_svm_enter(struct guest_info * info) {
     vmcb_saved_state_t * guest_state = GET_VMCB_SAVE_STATE_AREA((vmcb_t*)(info->vmm_data)); 
     addr_t exit_code = 0, exit_info1 = 0, exit_info2 = 0;
 
+    v3_update_timers(info);
+    v3_adjust_time(info);
+
     // Conditionally yield the CPU if the timeslice has expired
     v3_yield_cond(info);
 
@@ -477,12 +480,6 @@ int v3_svm_enter(struct guest_info * info) {
     }
 #endif
 
-    v3_update_timers(info);
-
-    /* If this guest is frequency-lagged behind host time, wait 
-     * for the appropriate host time before resuming the guest. */
-    v3_adjust_time(info);
-
     guest_ctrl->TSC_OFFSET = v3_tsc_host_offset(&info->time_state);
 
     //V3_Print("Calling v3_svm_launch\n");
index 5d01aa9..cca2359 100644 (file)
@@ -367,6 +367,7 @@ static int info_hcall(struct guest_info * core, uint_t hcall_id, void * priv_dat
     v3_cpu_arch_t cpu_type = v3_get_cpu_type(V3_Get_CPU());
     int cpu_valid = 0;
 
+    V3_Print("************** Guest State ************\n");
     v3_print_guest_state(core);
     
     // init SVM/VMX
index 8fecd3c..dc05084 100644 (file)
@@ -28,9 +28,9 @@ void v3_dump_mem(uint8_t * start, int n) {
        V3_Print("%p", (void *)(start + i));
        for (j = i; (j < (i + 16)) && (j < n); j += 2) {
            V3_Print(" ");
-           V3_Print("%x", *(uint8_t *)(start + j));
+           V3_Print("%02x", *(uint8_t *)(start + j));
            if ((j + 1) < n) { 
-               V3_Print("%x", *((uint8_t *)(start + j + 1)));
+               V3_Print("%02x", *((uint8_t *)(start + j + 1)));
            }
        }
        V3_Print(" ");