On Wed, May 12, 2010 at 04:42:30PM +0100, Stefan Hajnoczi wrote:
On Tue, May 11, 2010 at 1:21 PM, Gleb Natapov gleb@redhat.com wrote:
- Disable interrupt otherwise interrupt may stuck
with some guests.
[...]
diff --git a/src/virtio-ring.h b/src/virtio-ring.h index 95ae85b..f2f2460 100644 --- a/src/virtio-ring.h +++ b/src/virtio-ring.h @@ -105,6 +105,8 @@ static inline void vring_init(struct vring *vr, vr->desc = phys_to_virt(pa);
vr->avail = (struct vring_avail *)&vr->desc[num];
- /* disable interrupts */
- vr->avail->flags |= VRING_AVAIL_F_NO_INTERRUPT;
I don't understand this. Why would the interrupt get stuck?
Because virtio-blk will send interrupt on read completion, but nobody ever clears it and if OS will unmask the interrupt before virtio-blk initialization nobody will know how to ack it.
The virtio-net device closely manages interrupts because it uses NAPI. The virtio-blk device assumes it will receive interrupts and doesn't enable_cb/disable_cb. I might be confused but have you tested this change with virtio-blk?
This is per virt queue flag. virtio-blk creates another virt queue without the flag. It works for me with virtio-blk.
-- Gleb.