diff mbox

virtio: Fix no interrupt when not creating msi controller

Message ID 1484880649-12600-1-git-send-email-zhaoshenglong@huawei.com
State New
Headers show

Commit Message

Shannon Zhao Jan. 20, 2017, 2:50 a.m. UTC
From: Shannon Zhao <shannon.zhao@linaro.org>


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 <shannon.zhao@linaro.org>

---
 hw/virtio/virtio.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.0.4

Comments

Michael S. Tsirkin Jan. 20, 2017, 4:51 p.m. UTC | #1
On Fri, Jan 20, 2017 at 10:50:49AM +0800, Shannon Zhao wrote:
> From: Shannon Zhao <shannon.zhao@linaro.org>

> 

> 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 <shannon.zhao@linaro.org>

> ---

>  hw/virtio/virtio.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c

> index aa4f38f..709b718 100644

> --- a/hw/virtio/virtio.c

> +++ b/hw/virtio/virtio.c

> @@ -2082,6 +2082,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_set_isr(vq->vdev, 0x1);

>          virtio_notify_vector(vq->vdev, vq->vector);

>      }

>  }


Then you should bring back virtio_irq, to avoid duplicating
code from virtio_notify.



> -- 

> 2.0.4

>
diff mbox

Patch

diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index aa4f38f..709b718 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -2082,6 +2082,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_set_isr(vq->vdev, 0x1);
         virtio_notify_vector(vq->vdev, vq->vector);
     }
 }