From: Patrick G. Bridges Date: Wed, 10 Nov 2010 15:57:14 +0000 (-0700) Subject: Minor debugging print changes/fixups X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=3a0ee76fe3accce60ae161615cadc6e56cac008b Minor debugging print changes/fixups --- diff --git a/palacios/src/devices/apic.c b/palacios/src/devices/apic.c index c051bc8..b8e2fef 100644 --- a/palacios/src/devices/apic.c +++ b/palacios/src/devices/apic.c @@ -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", diff --git a/palacios/src/palacios/svm.c b/palacios/src/palacios/svm.c index a1fad8d..a88ff0e 100644 --- a/palacios/src/palacios/svm.c +++ b/palacios/src/palacios/svm.c @@ -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"); diff --git a/palacios/src/palacios/vm_guest.c b/palacios/src/palacios/vm_guest.c index 5d01aa9..cca2359 100644 --- a/palacios/src/palacios/vm_guest.c +++ b/palacios/src/palacios/vm_guest.c @@ -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 diff --git a/palacios/src/palacios/vmm_util.c b/palacios/src/palacios/vmm_util.c index 8fecd3c..dc05084 100644 --- a/palacios/src/palacios/vmm_util.c +++ b/palacios/src/palacios/vmm_util.c @@ -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(" ");