virtio: Clear interrupt status register in virtio-blk
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 7 Jul 2010 12:34:22 +0000 (13:34 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 8 Jul 2010 12:42:05 +0000 (08:42 -0400)
commit4e0daae583aeaac8e2a7fb25d02533bf40ecf29b
tree7953a958de7a4e914777895eeb9f91066fdca5f3
parentaf0963d3c5c0f255ffde1dbcb7a8bc68b79f86b2
virtio: Clear interrupt status register in virtio-blk

The VRING_AVAIL_F_NO_INTERRUPT flag is a hint that interrupts should be
suppressed.  It does not guarantee that interrupts will not be raised.
Therefore, make sure to clear the interrupt after each virtio-blk read.
This avoids a stuck interrupt interfering with the OS loaded later in
the boot process.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
src/virtio-blk.c
src/virtio-pci.h