* [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order
@ 2013-01-15 17:42 Michael S. Tsirkin
2013-01-15 19:15 ` Laszlo Ersek
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2013-01-15 17:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Anthony Liguori, Laszlo Ersek, Stefan Hajnoczi
Order of arguments of kvm_virtio_pci_irqfd_release
got mixed up in all calls.
As a result users see assertions during cleanup.
Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio-pci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 0934246..212acd8 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -576,7 +576,7 @@ undo:
continue;
}
if (proxy->vdev->guest_notifier_mask) {
- kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
+ kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
}
kvm_virtio_pci_vq_vector_release(proxy, vector);
}
@@ -602,7 +602,7 @@ static void kvm_virtio_pci_vector_release(VirtIOPCIProxy *proxy, int nvqs)
* Otherwise, it was cleaned when masked in the frontend.
*/
if (proxy->vdev->guest_notifier_mask) {
- kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
+ kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
}
kvm_virtio_pci_vq_vector_release(proxy, vector);
}
@@ -651,7 +651,7 @@ static void kvm_virtio_pci_vq_vector_mask(VirtIOPCIProxy *proxy,
if (proxy->vdev->guest_notifier_mask) {
proxy->vdev->guest_notifier_mask(proxy->vdev, queue_no, true);
} else {
- kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
+ kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
}
}
--
MST
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order
2013-01-15 17:42 [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order Michael S. Tsirkin
@ 2013-01-15 19:15 ` Laszlo Ersek
2013-01-16 8:46 ` Stefan Hajnoczi
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2013-01-15 19:15 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Paolo Bonzini, Anthony Liguori, qemu-devel, Stefan Hajnoczi
On 01/15/13 18:42, Michael S. Tsirkin wrote:
> Order of arguments of kvm_virtio_pci_irqfd_release
> got mixed up in all calls.
> As a result users see assertions during cleanup.
>
> Reported-by: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> hw/virtio-pci.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index 0934246..212acd8 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
> @@ -576,7 +576,7 @@ undo:
> continue;
> }
> if (proxy->vdev->guest_notifier_mask) {
> - kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
> + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
> }
> kvm_virtio_pci_vq_vector_release(proxy, vector);
> }
> @@ -602,7 +602,7 @@ static void kvm_virtio_pci_vector_release(VirtIOPCIProxy *proxy, int nvqs)
> * Otherwise, it was cleaned when masked in the frontend.
> */
> if (proxy->vdev->guest_notifier_mask) {
> - kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
> + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
> }
> kvm_virtio_pci_vq_vector_release(proxy, vector);
> }
> @@ -651,7 +651,7 @@ static void kvm_virtio_pci_vq_vector_mask(VirtIOPCIProxy *proxy,
> if (proxy->vdev->guest_notifier_mask) {
> proxy->vdev->guest_notifier_mask(proxy->vdev, queue_no, true);
> } else {
> - kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
> + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
> }
> }
>
Heh, even I can review this patch!
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Thanks for the fix!
Laszlo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order
2013-01-15 17:42 [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order Michael S. Tsirkin
2013-01-15 19:15 ` Laszlo Ersek
@ 2013-01-16 8:46 ` Stefan Hajnoczi
2013-01-16 9:11 ` Wanlong Gao
2013-01-20 20:53 ` Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2013-01-16 8:46 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Paolo Bonzini, Anthony Liguori, Laszlo Ersek, qemu-devel
On Tue, Jan 15, 2013 at 07:42:38PM +0200, Michael S. Tsirkin wrote:
> Order of arguments of kvm_virtio_pci_irqfd_release
> got mixed up in all calls.
> As a result users see assertions during cleanup.
>
> Reported-by: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>
> hw/virtio-pci.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks for the fix.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order
2013-01-15 17:42 [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order Michael S. Tsirkin
2013-01-15 19:15 ` Laszlo Ersek
2013-01-16 8:46 ` Stefan Hajnoczi
@ 2013-01-16 9:11 ` Wanlong Gao
2013-01-20 20:53 ` Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Wanlong Gao @ 2013-01-16 9:11 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Paolo Bonzini, Anthony Liguori, Laszlo Ersek, qemu-devel,
Stefan Hajnoczi
On 01/16/2013 01:42 AM, Michael S. Tsirkin wrote:
> Order of arguments of kvm_virtio_pci_irqfd_release
> got mixed up in all calls.
> As a result users see assertions during cleanup.
>
> Reported-by: Laszlo Ersek <lersek@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Thank you, fixed my assertion here:
hw/virtio-pci.c:535: kvm_virtio_pci_irqfd_release: Assertion `ret == 0' failed.
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> ---
>
> hw/virtio-pci.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index 0934246..212acd8 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
> @@ -576,7 +576,7 @@ undo:
> continue;
> }
> if (proxy->vdev->guest_notifier_mask) {
> - kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
> + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
> }
> kvm_virtio_pci_vq_vector_release(proxy, vector);
> }
> @@ -602,7 +602,7 @@ static void kvm_virtio_pci_vector_release(VirtIOPCIProxy *proxy, int nvqs)
> * Otherwise, it was cleaned when masked in the frontend.
> */
> if (proxy->vdev->guest_notifier_mask) {
> - kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
> + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
> }
> kvm_virtio_pci_vq_vector_release(proxy, vector);
> }
> @@ -651,7 +651,7 @@ static void kvm_virtio_pci_vq_vector_mask(VirtIOPCIProxy *proxy,
> if (proxy->vdev->guest_notifier_mask) {
> proxy->vdev->guest_notifier_mask(proxy->vdev, queue_no, true);
> } else {
> - kvm_virtio_pci_irqfd_release(proxy, vector, queue_no);
> + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
> }
> }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order
2013-01-15 17:42 [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order Michael S. Tsirkin
` (2 preceding siblings ...)
2013-01-16 9:11 ` Wanlong Gao
@ 2013-01-20 20:53 ` Anthony Liguori
3 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2013-01-20 20:53 UTC (permalink / raw)
To: Michael S. Tsirkin, qemu-devel
Cc: Paolo Bonzini, Anthony Liguori, Laszlo Ersek, Stefan Hajnoczi
Applied. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-20 20:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-15 17:42 [Qemu-devel] [PATCH] virtio-pci: fix irqfd cleanup argument order Michael S. Tsirkin
2013-01-15 19:15 ` Laszlo Ersek
2013-01-16 8:46 ` Stefan Hajnoczi
2013-01-16 9:11 ` Wanlong Gao
2013-01-20 20:53 ` Anthony Liguori
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).