X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_handler.c;h=798177e84553e045c03c1ad09d89d2c66b68ba8d;hb=03a41b18bdb6ce4bf666f18acdaf302e2360efdc;hp=a2b942feaaadd081555105f696ffab4d9e61c177;hpb=8c767ddb04d3ac42d080d9f9f5f40196d6f8f217;p=palacios.git diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index a2b942f..798177e 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -190,7 +190,8 @@ int v3_handle_svm_exit(struct guest_info * info) { addr_t fault_addr = guest_ctrl->exit_info2; pf_error_t * error_code = (pf_error_t *)&(guest_ctrl->exit_info1); #ifdef DEBUG_SHADOW_PAGING - PrintDebug("PageFault at %x (error=%d)\n", fault_addr, *error_code); + PrintDebug("PageFault at %p (error=%d)\n", + (void *)fault_addr, *(uint_t *)error_code); #endif if (info->shdw_pg_mode == SHADOW_PAGING) { if (v3_handle_shadow_pagefault(info, fault_addr, *error_code) == -1) { @@ -338,10 +339,10 @@ int v3_handle_svm_exit(struct guest_info * info) { PrintError("SVM Returned:(VMCB=%p)\n", (void *)(info->vmm_data)); - PrintError("RIP: %p\n", (void *)(guest_state->rip)); - PrintError("RIP Linear: %p\n", (void *)(rip_addr)); + PrintError("RIP: %p\n", (void *)(addr_t)(guest_state->rip)); + PrintError("RIP Linear: %p\n", (void *)(addr_t)(rip_addr)); - PrintError("SVM Returned: Exit Code: %p\n", (void *)exit_code); + PrintError("SVM Returned: Exit Code: %p\n", (void *)(addr_t)exit_code); PrintError("io_info1 low = 0x%.8x\n", *(uint_t*)&(guest_ctrl->exit_info1)); PrintError("io_info1 high = 0x%.8x\n", *(uint_t *)(((uchar_t *)&(guest_ctrl->exit_info1)) + 4)); @@ -352,12 +353,12 @@ int v3_handle_svm_exit(struct guest_info * info) { if (info->mem_mode == PHYSICAL_MEM) { - if (guest_pa_to_host_pa(info, guest_state->rip, &host_addr) == -1) { + if (guest_pa_to_host_va(info, guest_state->rip, &host_addr) == -1) { PrintError("Could not translate guest_state->rip to host address\n"); return -1; } } else if (info->mem_mode == VIRTUAL_MEM) { - if (guest_va_to_host_pa(info, guest_state->rip, &host_addr) == -1) { + if (guest_va_to_host_va(info, guest_state->rip, &host_addr) == -1) { PrintError("Could not translate guest_state->rip to host address\n"); return -1; } @@ -414,7 +415,9 @@ int v3_handle_svm_exit(struct guest_info * info) { guest_ctrl->guest_ctrl.V_IGN_TPR = 1; guest_ctrl->guest_ctrl.V_INTR_PRIO = 0xf; #ifdef DEBUG_INTERRUPTS - PrintDebug("Injecting Interrupt %d (EIP=%x)\n", guest_ctrl->guest_ctrl.V_INTR_VECTOR, info->rip); + PrintDebug("Injecting Interrupt %d (EIP=%p)\n", + guest_ctrl->guest_ctrl.V_INTR_VECTOR, + (void *)(addr_t)info->rip); #endif v3_injecting_intr(info, irq, EXTERNAL_IRQ); @@ -441,7 +444,9 @@ int v3_handle_svm_exit(struct guest_info * info) { guest_ctrl->EVENTINJ.valid = 1; #ifdef DEBUG_INTERRUPTS - PrintDebug("Injecting Interrupt %d (EIP=%x)\n", guest_ctrl->EVENTINJ.vector, info->rip); + PrintDebug("Injecting Interrupt %d (EIP=%p)\n", + guest_ctrl->EVENTINJ.vector, + (void *)(addr_t)info->rip); #endif v3_injecting_intr(info, excp, EXCEPTION); break;