summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2014-12-16 06:33:57 +0000
committerneel <neel@FreeBSD.org>2014-12-16 06:33:57 +0000
commitbdae65463ea82ed7b759b8281c6380f93c274157 (patch)
tree205edc821801abfeb2f406d2e635e209da81e9b1 /sys/amd64/vmm
parent5635c9143838206c285747b2246d524a5b5f02c1 (diff)
downloadFreeBSD-src-bdae65463ea82ed7b759b8281c6380f93c274157.zip
FreeBSD-src-bdae65463ea82ed7b759b8281c6380f93c274157.tar.gz
For level triggered interrupts clear the PIC IRR bit when the interrupt pin
is deasserted. Prior to this change each assertion on a level triggered irq pin resulted in two interrupts being delivered to the CPU. Differential Revision: https://reviews.freebsd.org/D1310 Reviewed by: tychon MFC after: 1 week
Diffstat (limited to 'sys/amd64/vmm')
-rw-r--r--sys/amd64/vmm/io/vatpic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/vmm/io/vatpic.c b/sys/amd64/vmm/io/vatpic.c
index 54d8155..deef5a2 100644
--- a/sys/amd64/vmm/io/vatpic.c
+++ b/sys/amd64/vmm/io/vatpic.c
@@ -388,6 +388,8 @@ vatpic_set_pinstate(struct vatpic *vatpic, int pin, bool newstate)
} else if (oldcnt == 1 && newcnt == 0) {
/* falling edge */
VATPIC_CTR1(vatpic, "atpic pin%d: deasserted", pin);
+ if (level)
+ atpic->request &= ~(1 << (pin & 0x7));
} else {
VATPIC_CTR3(vatpic, "atpic pin%d: %s, ignored, acnt %d",
pin, newstate ? "asserted" : "deasserted", newcnt);
OpenPOWER on IntegriCloud