-/* $OpenBSD: i8253.c,v 1.26 2018/06/19 17:12:34 reyk Exp $ */
+/* $OpenBSD: i8253.c,v 1.27 2018/07/09 16:11:37 mlarkin Exp $ */
/*
* Copyright (c) 2016 Mike Larkin <mlarkin@openbsd.org>
*
struct i8253_channel *ctr = (struct i8253_channel *)arg;
vcpu_assert_pic_irq(ctr->vm_id, 0, 0);
+ vcpu_deassert_pic_irq(ctr->vm_id, 0, 0);
if (ctr->mode != TIMER_INTTC) {
timerclear(&tv);
-/* $OpenBSD: mc146818.c,v 1.16 2018/02/28 06:53:25 pd Exp $ */
+/* $OpenBSD: mc146818.c,v 1.17 2018/07/09 16:11:37 mlarkin Exp $ */
/*
* Copyright (c) 2016 Mike Larkin <mlarkin@openbsd.org>
*
rtc.regs[MC_REGC] |= MC_REGC_PF;
vcpu_assert_pic_irq((ptrdiff_t)arg, 0, 8);
+ vcpu_deassert_pic_irq((ptrdiff_t)arg, 0, 8);
evtimer_add(&rtc.per, &rtc.per_tv);
}
-/* $OpenBSD: ns8250.c,v 1.15 2018/06/19 17:12:34 reyk Exp $ */
+/* $OpenBSD: ns8250.c,v 1.16 2018/07/09 16:11:37 mlarkin Exp $ */
/*
* Copyright (c) 2016 Mike Larkin <mlarkin@openbsd.org>
*
com1_dev.regs.iir |= IIR_TXRDY;
com1_dev.regs.iir &= ~IIR_NOPEND;
vcpu_assert_pic_irq(com1_dev.vmid, 0, com1_dev.irq);
+ vcpu_deassert_pic_irq(com1_dev.vmid, 0, com1_dev.irq);
}
void
if ((com1_dev.regs.iir & IIR_NOPEND) == 0) {
/* XXX: vcpu_id */
vcpu_assert_pic_irq((uintptr_t)arg, 0, com1_dev.irq);
+ vcpu_deassert_pic_irq((uintptr_t)arg, 0, com1_dev.irq);
}
}
mutex_unlock(&com1_dev.mutex);
- if ((com1_dev.regs.iir & IIR_NOPEND)) {
- /* XXX: vcpu_id */
- vcpu_deassert_pic_irq(com1_dev.vmid, 0, com1_dev.irq);
- }
-
return (intr);
}
-/* $OpenBSD: virtio.c,v 1.62 2018/07/09 08:43:09 mlarkin Exp $ */
+/* $OpenBSD: virtio.c,v 1.63 2018/07/09 16:11:37 mlarkin Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
case VIRTIO_CONFIG_ISR_STATUS:
*data = viornd.cfg.isr_status;
viornd.cfg.isr_status = 0;
+ vcpu_deassert_pic_irq(viornd.vm_id, 0, viornd.irq);
break;
}
}
dev->cfg.queue_notify = 0;
dev->cfg.isr_status = 0;
dev->vq[0].last_avail = 0;
+ vcpu_deassert_pic_irq(dev->vm_id, 0, dev->irq);
}
break;
default:
case VIRTIO_CONFIG_ISR_STATUS:
*data = dev->cfg.isr_status;
dev->cfg.isr_status = 0;
+ vcpu_deassert_pic_irq(dev->vm_id, 0, dev->irq);
break;
}
}
dev->vq[RXQ].notified_avail = 0;
dev->vq[TXQ].last_avail = 0;
dev->vq[TXQ].notified_avail = 0;
+ vcpu_deassert_pic_irq(dev->vm_id, 0, dev->irq);
}
break;
default:
case VIRTIO_CONFIG_ISR_STATUS:
*data = dev->cfg.isr_status;
dev->cfg.isr_status = 0;
+ vcpu_deassert_pic_irq(dev->vm_id, 0, dev->irq);
break;
}
}
case VIRTIO_CONFIG_ISR_STATUS:
*data = vmmci.cfg.isr_status;
vmmci.cfg.isr_status = 0;
+ vcpu_deassert_pic_irq(vmmci.vm_id, 0, vmmci.irq);
break;
}
}
+ sizeof(uint16_t) * (2 + VIORND_QUEUE_SIZE));
viornd.pci_id = id;
viornd.irq = pci_get_dev_irq(id);
+ viornd.vm_id = vcp->vcp_id;
if (vcp->vcp_ndisks > 0) {
nr_vioblk = vcp->vcp_ndisks;
vioblk[i].cfg.device_feature = VIRTIO_BLK_F_SIZE_MAX;
vioblk[i].max_xfer = 1048576;
vioblk[i].pci_id = id;
+ vioblk[i].vm_id = vcp->vcp_id;
vioblk[i].irq = pci_get_dev_irq(id);
}
}
vioscsi->n_blocks = sz >> 11; /* num of 2048 blocks in file */
vioscsi->max_xfer = VIOSCSI_BLOCK_SIZE_CDROM;
vioscsi->pci_id = id;
+ vioscsi->vm_id = vcp->vcp_id;
vioscsi->irq = pci_get_dev_irq(id);
}