* [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix
@ 2013-05-06 15:00 Michael S. Tsirkin
2013-05-06 20:51 ` Anthony Liguori
2013-05-09 6:48 ` Stefan Hajnoczi
0 siblings, 2 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2013-05-06 15:00 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Paolo Bonzini, Anthony Liguori, Michael S. Tsirkin,
KONRAD Frederic
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix
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
2013-05-09 6:48 ` Stefan Hajnoczi
1 sibling, 1 reply; 4+ messages in thread
From: Anthony Liguori @ 2013-05-06 20:51 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel
Cc: Peter Maydell, Paolo Bonzini, KONRAD Frederic
"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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix
2013-05-06 20:51 ` Anthony Liguori
@ 2013-05-07 9:28 ` KONRAD Frédéric
0 siblings, 0 replies; 4+ messages in thread
From: KONRAD Frédéric @ 2013-05-07 9:28 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Paolo Bonzini, Anthony Liguori, qemu-devel, Peter Maydell
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-1.5] virtio-pci: bugfix
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-09 6:48 ` Stefan Hajnoczi
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2013-05-09 6:48 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Peter Maydell, Anthony Liguori, KONRAD Frederic, qemu-devel,
Paolo Bonzini
On Mon, May 06, 2013 at 06:00:27PM +0300, 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>
>
> ---
> hw/virtio/virtio-pci.c | 4 ++++
> 1 file changed, 4 insertions(+)
Please choose a descriptive commit message, not just "bugfix".
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-09 6:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2013-05-09 6:48 ` Stefan Hajnoczi
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).