info->intr_state.excp_error_code = 0;
memset((uchar_t *)(info->intr_state.hooks), 0, sizeof(struct v3_irq_hook *) * 256);
-
- info->vm_ops.raise_irq = &v3_raise_irq;
- info->vm_ops.lower_irq = &v3_lower_irq;
}
void v3_set_intr_controller(struct guest_info * info, struct intr_ctrl_ops * ops, void * state) {
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);
}
NULL);
if (rc) {
- PrintError("guest_irq_injection: failed to hook irq 0x%x (guest=0x%x)\n", irq, info);
+ PrintError("guest_irq_injection: failed to hook irq 0x%x (guest=0x%p)\n", irq, (void *)info);
return -1;
} else {
- PrintDebug("guest_irq_injection: hooked irq 0x%x (guest=0x%x)\n", irq, info);
+ PrintDebug("guest_irq_injection: hooked irq 0x%x (guest=0x%p)\n", irq, (void *)info);
return 0;
}
}
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);
return 0;
}
-
+
int v3_intr_pending(struct guest_info * info) {
struct v3_intr_state * intr_state = &(info->intr_state);