Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157272558
D30505.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30505.diff
View Options
diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h
--- a/usr.sbin/bhyve/virtio.h
+++ b/usr.sbin/bhyve/virtio.h
@@ -348,24 +348,35 @@
}
/*
- * Deliver an interrupt to guest on the given virtual queue
- * (if possible, or a generic MSI interrupt if not using MSI-X).
+ * Deliver an interrupt to the guest for a specific MSI-X queue or
+ * event.
*/
static inline void
-vq_interrupt(struct virtio_softc *vs, struct vqueue_info *vq)
+vi_interrupt(struct virtio_softc *vs, uint8_t isr, uint16_t msix_idx)
{
if (pci_msix_enabled(vs->vs_pi))
- pci_generate_msix(vs->vs_pi, vq->vq_msix_idx);
+ pci_generate_msix(vs->vs_pi, msix_idx);
else {
VS_LOCK(vs);
- vs->vs_isr |= VIRTIO_PCI_ISR_INTR;
+ vs->vs_isr |= isr;
pci_generate_msi(vs->vs_pi, 0);
pci_lintr_assert(vs->vs_pi);
VS_UNLOCK(vs);
}
}
+/*
+ * Deliver an interrupt to the guest on the given virtual queue (if
+ * possible, or a generic MSI interrupt if not using MSI-X).
+ */
+static inline void
+vq_interrupt(struct virtio_softc *vs, struct vqueue_info *vq)
+{
+
+ vi_interrupt(vs, VIRTIO_PCI_ISR_INTR, vq->vq_msix_idx);
+}
+
static inline void
vq_kick_enable(struct vqueue_info *vq)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 20, 10:25 PM (2 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33359528
Default Alt Text
D30505.diff (1 KB)
Attached To
Mode
D30505: bhyve: Split out a lower-level helper for VirtIO interrupts.
Attached
Detach File
Event Timeline
Log In to Comment