qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio: Fix no interrupt when not creating msi controller
@ 2017-01-20  2:50 Shannon Zhao
  2017-01-20 16:51 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Shannon Zhao @ 2017-01-20  2:50 UTC (permalink / raw)
  To: qemu-devel, mst, pbonzini
  Cc: qemu-arm, peter.maydell, christoffer.dall, shannon.zhao

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);
     }
 }
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] virtio: Fix no interrupt when not creating msi controller
  2017-01-20  2:50 [Qemu-devel] [PATCH] virtio: Fix no interrupt when not creating msi controller Shannon Zhao
@ 2017-01-20 16:51 ` Michael S. Tsirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2017-01-20 16:51 UTC (permalink / raw)
  To: Shannon Zhao
  Cc: qemu-devel, pbonzini, qemu-arm, peter.maydell, christoffer.dall,
	shannon.zhao

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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-20 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20  2:50 [Qemu-devel] [PATCH] virtio: Fix no interrupt when not creating msi controller Shannon Zhao
2017-01-20 16:51 ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).