projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b34b55b
)
dev: Correctly clear interrupts in VirtIO PCI
author
Andreas Sandberg
<Andreas.Sandberg@ARM.com>
Tue, 3 Feb 2015 19:25:47 +0000
(14:25 -0500)
committer
Andreas Sandberg
<Andreas.Sandberg@ARM.com>
Tue, 3 Feb 2015 19:25:47 +0000
(14:25 -0500)
Correctly clear the PCI interrupt belonging to a VirtIO device when
the ISR register is read.
src/dev/virtio/pci.cc
patch
|
blob
|
history
diff --git
a/src/dev/virtio/pci.cc
b/src/dev/virtio/pci.cc
index a051a8f51adbc04c5221a5adf615c3a953cb10bf..fb0735eba170f7c25b550ba856065eb9bdebe4ab 100644
(file)
--- a/
src/dev/virtio/pci.cc
+++ b/
src/dev/virtio/pci.cc
@@
-123,8
+123,11
@@
PciVirtIO::read(PacketPtr pkt)
case OFF_ISR_STATUS: {
DPRINTF(VIOPci, " ISR_STATUS\n");
assert(size == sizeof(uint8_t));
- uint8_t isr_status(interruptDeliveryPending ? 1 : 0);
- interruptDeliveryPending = false;
+ const uint8_t isr_status(interruptDeliveryPending ? 1 : 0);
+ if (interruptDeliveryPending) {
+ interruptDeliveryPending = false;
+ intrClear();
+ }
pkt->set<uint8_t>(isr_status);
} break;