From: "KONRAD Frédéric" <fred.konrad@greensocs.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix
Date: Tue, 07 May 2013 11:28:06 +0200 [thread overview]
Message-ID: <5188C926.2060400@greensocs.com> (raw)
In-Reply-To: <87sj1zvnlm.fsf@codemonkey.ws>
On 06/05/2013 22:51, Anthony Liguori wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
>
>> 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>
> /home/aliguori/git/qemu/hw/virtio/virtio-pci.c: In function ‘virtio_pci_set_guest_notifier’:
> /home/aliguori/git/qemu/hw/virtio/virtio-pci.c:761:54: error: ‘VirtIODevice’ has no member named ‘guest_notifier_mask’
> /home/aliguori/git/qemu/hw/virtio/virtio-pci.c:762:20: error: ‘VirtIODevice’ has no member named ‘guest_notifier_mask’
> CC hw/virtio/dataplane/hostmem.o
> make: *** [hw/virtio/virtio-pci.o] Error 1
>
> Regards,
>
> Anthony Liguori
>
>> ---
>> hw/virtio/virtio-pci.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
>> index 8bba0f3..d0fcc6c 100644
>> --- a/hw/virtio/virtio-pci.c
>> +++ b/hw/virtio/virtio-pci.c
>> @@ -758,6 +758,10 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign,
>> event_notifier_cleanup(notifier);
>> }
>>
>> + if (!msix_enabled(&proxy->pci_dev) && proxy->vdev->guest_notifier_mask) {
>> + proxy->vdev->guest_notifier_mask(proxy->vdev, n, !assign);
>> + }
>> +
>> return 0;
>> }
>>
>> --
>> MST
You need to use, VirtioDeviceClass to use guest_notifier_mask:
VirtIODevice *vdev = proxy->vdev;
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
then:
if (!msix_enabled(&proxy->pci_dev) && k->guest_notifier_mask) {
k->guest_notifier_mask(vdev, n, !assign);
}
Fred
next prev parent reply other threads:[~2013-05-07 9:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 15:00 [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix Michael S. Tsirkin
2013-05-06 20:51 ` Anthony Liguori
2013-05-07 9:28 ` KONRAD Frédéric [this message]
2013-05-09 6:48 ` Stefan Hajnoczi
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=5188C926.2060400@greensocs.com \
--to=fred.konrad@greensocs.com \
--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.