[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi con
From: |
Shannon Zhao |
Subject: |
[Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller |
Date: |
Mon, 23 Jan 2017 08:55:04 +0800 |
From: Shannon Zhao <address@hidden>
For ARM virt machine, if we use virt-2.7 which will not create ITS node,
the virtio-net can not recieve interrupts so it can't get ip address
through dhcp.
This fixes commit 83d768b(virtio: set ISR on dataplane notifications).
Signed-off-by: Shannon Zhao <address@hidden>
---
V2: Factor out a common function instead of duplicating code
---
hw/virtio/virtio.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index aa4f38f..00e8f74 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -1441,6 +1441,12 @@ void virtio_notify_irqfd(VirtIODevice *vdev, VirtQueue
*vq)
event_notifier_set(&vq->guest_notifier);
}
+static void virtio_irq(VirtQueue *vq)
+{
+ virtio_set_isr(vq->vdev, 0x1);
+ virtio_notify_vector(vq->vdev, vq->vector);
+}
+
void virtio_notify(VirtIODevice *vdev, VirtQueue *vq)
{
if (!virtio_should_notify(vdev, vq)) {
@@ -1448,8 +1454,7 @@ void virtio_notify(VirtIODevice *vdev, VirtQueue *vq)
}
trace_virtio_notify(vdev, vq);
- virtio_set_isr(vq->vdev, 0x1);
- virtio_notify_vector(vdev, vq->vector);
+ virtio_irq(vq);
}
void virtio_notify_config(VirtIODevice *vdev)
@@ -2082,7 +2087,7 @@ static void
virtio_queue_guest_notifier_read(EventNotifier *n)
{
VirtQueue *vq = container_of(n, VirtQueue, guest_notifier);
if (event_notifier_test_and_clear(n)) {
- virtio_notify_vector(vq->vdev, vq->vector);
+ virtio_irq(vq);
}
}
--
2.0.4
- [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller,
Shannon Zhao <=
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Michael S. Tsirkin, 2017/01/23
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Paolo Bonzini, 2017/01/23
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Michael S. Tsirkin, 2017/01/23
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Paolo Bonzini, 2017/01/24
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Michael S. Tsirkin, 2017/01/24
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Paolo Bonzini, 2017/01/24
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Michael S. Tsirkin, 2017/01/24
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Paolo Bonzini, 2017/01/24
- Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller, Michael S. Tsirkin, 2017/01/24