X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fsvm_io.c;h=04b488bddc853b17d98bf0c42be22626e010d156;hb=207e3b36648e4019ad8505c75ae6ef0778464a26;hp=cad3fbe7c512796b05a7a8bfa54c6c92e59b5860;hpb=3cd1d3771e3f8e30b09f6c4995851979aaafc5ff;p=palacios.git diff --git a/palacios/src/palacios/svm_io.c b/palacios/src/palacios/svm_io.c index cad3fbe..04b488b 100644 --- a/palacios/src/palacios/svm_io.c +++ b/palacios/src/palacios/svm_io.c @@ -114,7 +114,7 @@ int v3_handle_svm_io_ins(struct guest_info * info) { addr_t inst_ptr; - if (guest_va_to_host_pa(info,get_addr_linear(info,info->rip,&(info->segments.cs)),&inst_ptr)==-1) { + if (guest_va_to_host_va(info, get_addr_linear(info, info->rip, &(info->segments.cs)), &inst_ptr) == -1) { PrintError("Can't access instruction\n"); return -1; } @@ -170,7 +170,8 @@ int v3_handle_svm_io_ins(struct guest_info * info) { // This value should be set depending on the host register size... mask = get_gpr_mask(info); - PrintDebug("INS io_info invalid address size, mask=0x%x, io_info=0x%x\n",mask,*((uint_t*)(io_info))); + PrintDebug("INS io_info invalid address size, mask=0x%p, io_info=0x%p\n", + (void *)(addr_t)mask, (void *)(addr_t)(io_info)); // PrintDebug("INS Aborted... Check implementation\n"); //return -1; } @@ -187,7 +188,7 @@ int v3_handle_svm_io_ins(struct guest_info * info) { addr_t host_addr; dst_addr = get_addr_linear(info, info->vm_regs.rdi & mask, theseg); - PrintDebug("Writing 0x%x\n", dst_addr); + PrintDebug("Writing 0x%p\n", (void *)dst_addr); if (guest_va_to_host_va(info, dst_addr, &host_addr) == -1) { // either page fault or gpf... @@ -309,7 +310,8 @@ int v3_handle_svm_io_outs(struct guest_info * info) { // This value should be set depending on the host register size... mask = get_gpr_mask(info); - PrintDebug("OUTS io_info invalid address size, mask=0x%, io_info=0x%x\n",mask,*((uint_t*)(io_info))); + PrintDebug("OUTS io_info invalid address size, mask=0%p, io_info=0x%p\n", + (void *)(addr_t)mask, (void *)(addr_t)io_info); // PrintDebug("INS Aborted... Check implementation\n"); //return -1; // should never happen @@ -325,7 +327,7 @@ int v3_handle_svm_io_outs(struct guest_info * info) { addr_t inst_ptr; - if (guest_va_to_host_pa(info,get_addr_linear(info,info->rip,&(info->segments.cs)),&inst_ptr)==-1) { + if (guest_va_to_host_va(info,get_addr_linear(info,info->rip,&(info->segments.cs)),&inst_ptr)==-1) { PrintError("Can't access instruction\n"); return -1; }