Page MenuHomeFreeBSD

D669.diff
No OneTemporary

D669.diff

Index: sys/amd64/vmm/io/vatpic.c
===================================================================
--- sys/amd64/vmm/io/vatpic.c
+++ sys/amd64/vmm/io/vatpic.c
@@ -500,13 +500,19 @@
VATPIC_LOCK(vatpic);
pin = vatpic_get_highest_irrpin(atpic);
- if (pin == -1)
- pin = 7;
if (pin == 2) {
atpic = &vatpic->atpic[1];
pin = vatpic_get_highest_irrpin(atpic);
}
+ /*
+ * If there are no pins active at this moment then return the spurious
+ * interrupt vector instead.
+ */
+ if (pin == -1)
+ pin = 7;
+
+ KASSERT(pin >= 0 && pin <= 7, ("%s: invalid pin %d", __func__, pin));
*vecptr = atpic->irq_base + pin;
VATPIC_UNLOCK(vatpic);

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 4, 6:31 AM (19 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35945462
Default Alt Text
D669.diff (656 B)

Event Timeline