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) {
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 *)info->rip);
#endif
v3_injecting_intr(info, irq, EXTERNAL_IRQ);
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 *)info->rip);
#endif
v3_injecting_intr(info, excp, EXCEPTION);
break;
// 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 *)mask, (void *)(io_info));
// PrintDebug("INS Aborted... Check implementation\n");
//return -1;
}
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...
// 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 *)mask, (void *)io_info);
// PrintDebug("INS Aborted... Check implementation\n");
//return -1;
// should never happen
static int passthrough_irq_handler(struct guest_info * info, struct v3_interrupt * intr, void * priv_data)
{
- PrintDebug("[passthrough_irq_handler] raise_irq=%d (guest=0x%x)\n", intr->irq, info);
+ PrintDebug("[passthrough_irq_handler] raise_irq=%d (guest=0x%p)\n",
+ intr->irq, (void *)info);
return v3_raise_irq(info, intr->irq);
}
int v3_deliver_irq(struct guest_info * info, struct v3_interrupt * intr) {
- PrintDebug("v3_deliver_irq: irq=%d state=0x%x, \n", intr->irq, intr);
+ PrintDebug("v3_deliver_irq: irq=%d state=0x%p, \n", intr->irq, (void *)intr);
struct v3_irq_hook * hook = get_irq_hook(info, intr->irq);
PrintDebug("VMM IO Map (Entries=%d)\n", io_map->num_ports);
while (iter) {
- PrintDebug("IO Port: %hu (Read=%x) (Write=%x)\n", iter->port, iter->read, iter->write);
+ PrintDebug("IO Port: %hu (Read=%p) (Write=%p)\n",
+ iter->port,
+ (void *)(iter->read), (void *)(iter->write));
}
}
if (host_page_type == HOST_REGION_INVALID) {
// Inject a machine check in the guest
- PrintDebug("Invalid Guest Address in page table (0x%x)\n", guest_fault_pa);
+ PrintDebug("Invalid Guest Address in page table (0x%p)\n", (void *)guest_fault_pa);
v3_raise_exception(info, MC_EXCEPTION);
return 0;
}
/* Was the page fault caused by the Guest's page tables? */
if (is_guest_pf(guest_pde_access, shadow_pde_access) == 1) {
PrintDebug("Injecting PDE pf to guest: (guest access error=%d) (pf error code=%d)\n",
- guest_pde_access, error_code);
+ *(uint_t *)&guest_pde_access, *(uint_t *)&error_code);
inject_guest_pf(info, fault_addr, error_code);
return 0;
}
return 0;
}
- PrintDebug("Returning end of PDE function (rip=%x)\n", info->rip);
+ PrintDebug("Returning end of PDE function (rip=%p)\n", (void *)(info->rip));
return 0;
}
if (host_page_type == HOST_REGION_INVALID) {
// Inject a machine check in the guest
- PrintDebug("Invalid Guest Address in page table (0x%x)\n", guest_pa);
+ PrintDebug("Invalid Guest Address in page table (0x%p)\n", (void *)guest_pa);
v3_raise_exception(info, MC_EXCEPTION);
return 0;
}
if (find_pte_map(state->cached_ptes, PT32_PAGE_ADDR(guest_pa)) != NULL) {
// Check if the entry is a page table...
- PrintDebug("Marking page as Guest Page Table\n", shadow_pte->writable);
+ PrintDebug("Marking page as Guest Page Table %d\n", shadow_pte->writable);
shadow_pte->vmm_info = PT32_GUEST_PT;
}
//PrintDebug("PDE Index=%d\n", PDE32_INDEX(first_operand));
//PrintDebug("FirstOperand = %x\n", first_operand);
- PrintDebug("Invalidating page for %x\n", first_operand);
+ PrintDebug("Invalidating page for %p\n", (void *)first_operand);
guest_pde = (pde32_t *)&(guest_pd[PDE32_INDEX(first_operand)]);