dev: Correctly clear interrupts in VirtIO PCI
Correctly clear the PCI interrupt belonging to a VirtIO device when the ISR register is read.
This commit is contained in:
parent
b34b55b597
commit
851b29ad20
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue