return -1;
}
if (hi_val) {
- PrintDebug("ioapic %u: Writing to hi of pin %d\n", ioapic->ioapic_id.val, redir_index);
+ PrintDebug("ioapic %u: Writing to hi of pin %d\n", ioapic->ioapic_id.id, redir_index);
ioapic->redir_tbl[redir_index].hi = op_val;
} else {
PrintDebug("ioapic %u: Writing to lo of pin %d\n", ioapic->ioapic_id.id, redir_index);
ipi.mode = irq_entry->del_mode;
ipi.logical = irq_entry->dst_mode;
ipi.trigger_mode = irq_entry->trig_mode;
- ipi->dst = irq_entry->dst_field;
- ipi->dst_shorthand = 0;
+ ipi.dst = irq_entry->dst_field;
+ ipi.dst_shorthand = 0;
// Need to add destination argument here...
- v3_apic_send_ipi(vm, ioapic->apic_dev, &ipi);
+ if (v3_apic_send_ipi(vm, ioapic->apic_dev, &ipi) == -1) {
+ PrintError("Error sending IPI to apic %d\n", ipi.dst);
+ return -1;
+ }
}
return 0;