From: "KONRAD Frédéric" <fred.konrad@greensocs.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCHv2 for-1.5] virtio-pci: fix level interrupts
Date: Tue, 07 May 2013 14:20:25 +0200 [thread overview]
Message-ID: <5188F189.7040102@greensocs.com> (raw)
In-Reply-To: <20130507102050.GA16836@redhat.com>
On 07/05/2013 12:20, Michael S. Tsirkin wrote:
> mask notifiers are never called without msix,
> so devices with backend masking like vhost don't work.
> Call mask notifiers explicitly at
> startup/cleanup to make it work.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> Tested-by: Alexander Graf <agraf@suse.de>
> ---
>
> Changes from v1:
> - rebase to master
>
> hw/virtio/virtio-pci.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index d8708c1..c97aee1 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -744,6 +744,7 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign,
> bool with_irqfd)
> {
> VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
> + VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(d);
I think there is a mistake here.
VIRTIO_DEVICE_GET_CLASS(proxy->vdev) should be used.
> VirtQueue *vq = virtio_get_queue(proxy->vdev, n);
> EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
>
> @@ -758,6 +759,10 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign,
> event_notifier_cleanup(notifier);
> }
>
> + if (!msix_enabled(&proxy->pci_dev) && vdc->guest_notifier_mask) {
> + vdc->guest_notifier_mask(proxy->vdev, n, !assign);
> + }
> +
> return 0;
> }
>
next prev parent reply other threads:[~2013-05-07 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 10:20 [Qemu-devel] [PATCHv2 for-1.5] virtio-pci: fix level interrupts Michael S. Tsirkin
2013-05-07 12:20 ` KONRAD Frédéric [this message]
2013-05-07 12:27 ` 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=5188F189.7040102@greensocs.com \
--to=fred.konrad@greensocs.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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.