From: "Michael S. Tsirkin" <mst@redhat.com>
To: Shannon Zhao <zhaoshenglong@huawei.com>
Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org,
qemu-devel@nongnu.org, christoffer.dall@linaro.org,
pbonzini@redhat.com
Subject: Re: [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller
Date: Mon, 23 Jan 2017 18:07:48 +0200 [thread overview]
Message-ID: <20170123180247-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1485132904-17632-1-git-send-email-zhaoshenglong@huawei.com>
On Mon, Jan 23, 2017 at 08:55:04AM +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>
Paolo, could you comment on this pls?
> ---
> 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
>
WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Shannon Zhao <zhaoshenglong@huawei.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
peter.maydell@linaro.org, pbonzini@redhat.com,
christoffer.dall@linaro.org
Subject: Re: [Qemu-devel] [PATCH V2] virtio: Fix no interrupt when not creating msi controller
Date: Mon, 23 Jan 2017 18:07:48 +0200 [thread overview]
Message-ID: <20170123180247-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1485132904-17632-1-git-send-email-zhaoshenglong@huawei.com>
On Mon, Jan 23, 2017 at 08:55:04AM +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>
Paolo, could you comment on this pls?
> ---
> 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
>
next prev parent reply other threads:[~2017-01-23 16:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 0:55 [Qemu-arm] [PATCH V2] virtio: Fix no interrupt when not creating msi controller Shannon Zhao
2017-01-23 0:55 ` [Qemu-devel] " Shannon Zhao
2017-01-23 16:07 ` Michael S. Tsirkin [this message]
2017-01-23 16:07 ` Michael S. Tsirkin
2017-01-23 16:46 ` [Qemu-arm] " Paolo Bonzini
2017-01-23 16:46 ` [Qemu-devel] " Paolo Bonzini
2017-01-23 17:04 ` [Qemu-arm] " Michael S. Tsirkin
2017-01-23 17:04 ` [Qemu-devel] " Michael S. Tsirkin
2017-01-24 9:25 ` [Qemu-arm] " Paolo Bonzini
2017-01-24 9:25 ` [Qemu-devel] " Paolo Bonzini
2017-01-24 14:44 ` [Qemu-arm] " Michael S. Tsirkin
2017-01-24 14:44 ` [Qemu-devel] " Michael S. Tsirkin
2017-01-24 15:00 ` Paolo Bonzini
2017-01-24 15:00 ` Paolo Bonzini
2017-01-24 15:05 ` [Qemu-arm] " Michael S. Tsirkin
2017-01-24 15:05 ` [Qemu-devel] " Michael S. Tsirkin
2017-01-24 15:50 ` [Qemu-arm] " Paolo Bonzini
2017-01-24 15:50 ` [Qemu-devel] " Paolo Bonzini
2017-01-24 15:55 ` [Qemu-arm] " Michael S. Tsirkin
2017-01-24 15:55 ` [Qemu-devel] " Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170123180247-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=christoffer.dall@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=zhaoshenglong@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.