* [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages
@ 2013-01-14 19:20 Michael Roth
2013-01-14 19:20 ` [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask Michael Roth
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Michael Roth @ 2013-01-14 19:20 UTC (permalink / raw)
To: qemu-devel; +Cc: aliguori, stefanha, mst
Build fixes for recent virtio commits. See patches for details.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask
2013-01-14 19:20 [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages Michael Roth
@ 2013-01-14 19:20 ` Michael Roth
2013-01-14 19:35 ` Eduardo Habkost
2013-01-14 19:37 ` Anthony Liguori
2013-01-14 19:20 ` [Qemu-devel] [PATCH 2/2] dataplane: fix build breakage on set_guest_notifiers() Michael Roth
2013-01-14 20:40 ` [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages Anthony Liguori
2 siblings, 2 replies; 8+ messages in thread
From: Michael Roth @ 2013-01-14 19:20 UTC (permalink / raw)
To: qemu-devel; +Cc: aliguori, stefanha, mst
Fixes the following:
/home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function
‘kvm_virtio_pci_vector_unmask’:
/home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: ‘ret’ may be
used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
make: *** [hw/virtio-pci.o] Error 1
make: *** Waiting for unfinished jobs....
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
hw/virtio-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 0b49739..0934246 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -616,7 +616,7 @@ static int kvm_virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy,
VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);
EventNotifier *n = virtio_queue_get_guest_notifier(vq);
VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
- int ret;
+ int ret = 0;
if (irqfd->msg.data != msg.data || irqfd->msg.address != msg.address) {
ret = kvm_irqchip_update_msi_route(kvm_state, irqfd->virq, msg);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 2/2] dataplane: fix build breakage on set_guest_notifiers()
2013-01-14 19:20 [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages Michael Roth
2013-01-14 19:20 ` [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask Michael Roth
@ 2013-01-14 19:20 ` Michael Roth
2013-01-15 7:23 ` Stefan Hajnoczi
2013-01-14 20:40 ` [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages Anthony Liguori
2 siblings, 1 reply; 8+ messages in thread
From: Michael Roth @ 2013-01-14 19:20 UTC (permalink / raw)
To: qemu-devel; +Cc: aliguori, stefanha, mst
virtio_pci_set_guest_notifiers() now takes an additional argument to
specify the number of virtqueues to assign a guest notifier for. This
causes a build breakage for CONFIG_VIRTIO_BLK_DATA_PLANE builds:
/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function
‘virtio_blk_data_plane_start’:
/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:451:47: error: too
few arguments to function ‘s->vdev->binding->set_guest_notifiers’
/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function
‘virtio_blk_data_plane_stop’:
/home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:511:5: error: too few
arguments to function ‘s->vdev->binding->set_guest_notifiers’
make[1]: *** [hw/dataplane/virtio-blk.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [subdir-x86_64-softmmu] Error 2
Fix this by passing 1 as the number of virtqueues to assign notifiers
for.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
hw/dataplane/virtio-blk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/dataplane/virtio-blk.c b/hw/dataplane/virtio-blk.c
index 1f7346e..4b26faa 100644
--- a/hw/dataplane/virtio-blk.c
+++ b/hw/dataplane/virtio-blk.c
@@ -447,7 +447,7 @@ void virtio_blk_data_plane_start(VirtIOBlockDataPlane *s)
event_poll_init(&s->event_poll);
/* Set up guest notifier (irq) */
- if (s->vdev->binding->set_guest_notifiers(s->vdev->binding_opaque,
+ if (s->vdev->binding->set_guest_notifiers(s->vdev->binding_opaque, 1,
true) != 0) {
fprintf(stderr, "virtio-blk failed to set guest notifier, "
"ensure -enable-kvm is set\n");
@@ -508,7 +508,7 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
event_poll_cleanup(&s->event_poll);
/* Clean up guest notifier (irq) */
- s->vdev->binding->set_guest_notifiers(s->vdev->binding_opaque, false);
+ s->vdev->binding->set_guest_notifiers(s->vdev->binding_opaque, 1, false);
vring_teardown(&s->vring);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask
2013-01-14 19:20 ` [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask Michael Roth
@ 2013-01-14 19:35 ` Eduardo Habkost
2013-01-14 19:37 ` Anthony Liguori
1 sibling, 0 replies; 8+ messages in thread
From: Eduardo Habkost @ 2013-01-14 19:35 UTC (permalink / raw)
To: Michael Roth; +Cc: aliguori, qemu-devel, stefanha, mst
On Mon, Jan 14, 2013 at 01:20:12PM -0600, Michael Roth wrote:
> Fixes the following:
>
> /home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function
> ‘kvm_virtio_pci_vector_unmask’:
> /home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: ‘ret’ may be
> used uninitialized in this function [-Werror=uninitialized]
> cc1: all warnings being treated as errors
> make: *** [hw/virtio-pci.o] Error 1
> make: *** Waiting for unfinished jobs....
>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> hw/virtio-pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index 0b49739..0934246 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
> @@ -616,7 +616,7 @@ static int kvm_virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy,
> VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);
> EventNotifier *n = virtio_queue_get_guest_notifier(vq);
> VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
> - int ret;
> + int ret = 0;
>
> if (irqfd->msg.data != msg.data || irqfd->msg.address != msg.address) {
> ret = kvm_irqchip_update_msi_route(kvm_state, irqfd->virq, msg);
> --
> 1.7.9.5
>
>
--
Eduardo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask
2013-01-14 19:20 ` [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask Michael Roth
2013-01-14 19:35 ` Eduardo Habkost
@ 2013-01-14 19:37 ` Anthony Liguori
2013-01-14 19:54 ` Michael S. Tsirkin
1 sibling, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2013-01-14 19:37 UTC (permalink / raw)
To: Michael Roth, qemu-devel; +Cc: stefanha, mst
Michael Roth <mdroth@linux.vnet.ibm.com> writes:
> Fixes the following:
>
> /home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function
> ‘kvm_virtio_pci_vector_unmask’:
> /home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: ‘ret’ may be
> used uninitialized in this function [-Werror=uninitialized]
> cc1: all warnings being treated as errors
> make: *** [hw/virtio-pci.o] Error 1
> make: *** Waiting for unfinished jobs....
>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Looks like I didn't have libaio-devel installed on my new development
box :-/
Regards,
Anthony Liguori
> ---
> hw/virtio-pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> index 0b49739..0934246 100644
> --- a/hw/virtio-pci.c
> +++ b/hw/virtio-pci.c
> @@ -616,7 +616,7 @@ static int kvm_virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy,
> VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);
> EventNotifier *n = virtio_queue_get_guest_notifier(vq);
> VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
> - int ret;
> + int ret = 0;
>
> if (irqfd->msg.data != msg.data || irqfd->msg.address != msg.address) {
> ret = kvm_irqchip_update_msi_route(kvm_state, irqfd->virq, msg);
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask
2013-01-14 19:37 ` Anthony Liguori
@ 2013-01-14 19:54 ` Michael S. Tsirkin
0 siblings, 0 replies; 8+ messages in thread
From: Michael S. Tsirkin @ 2013-01-14 19:54 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Michael Roth, stefanha, qemu-devel
On Mon, Jan 14, 2013 at 01:37:35PM -0600, Anthony Liguori wrote:
> Michael Roth <mdroth@linux.vnet.ibm.com> writes:
>
> > Fixes the following:
> >
> > /home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function
> > ‘kvm_virtio_pci_vector_unmask’:
> > /home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: ‘ret’ may be
> > used uninitialized in this function [-Werror=uninitialized]
> > cc1: all warnings being treated as errors
> > make: *** [hw/virtio-pci.o] Error 1
> > make: *** Waiting for unfinished jobs....
> >
> > Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>
> Looks like I didn't have libaio-devel installed on my new development
> box :-/
>
> Regards,
>
> Anthony Liguori
Me neither. And apparently neither does the buildbot.
> > ---
> > hw/virtio-pci.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
> > index 0b49739..0934246 100644
> > --- a/hw/virtio-pci.c
> > +++ b/hw/virtio-pci.c
> > @@ -616,7 +616,7 @@ static int kvm_virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy,
> > VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);
> > EventNotifier *n = virtio_queue_get_guest_notifier(vq);
> > VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
> > - int ret;
> > + int ret = 0;
> >
> > if (irqfd->msg.data != msg.data || irqfd->msg.address != msg.address) {
> > ret = kvm_irqchip_update_msi_route(kvm_state, irqfd->virq, msg);
> > --
> > 1.7.9.5
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages
2013-01-14 19:20 [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages Michael Roth
2013-01-14 19:20 ` [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask Michael Roth
2013-01-14 19:20 ` [Qemu-devel] [PATCH 2/2] dataplane: fix build breakage on set_guest_notifiers() Michael Roth
@ 2013-01-14 20:40 ` Anthony Liguori
2 siblings, 0 replies; 8+ messages in thread
From: Anthony Liguori @ 2013-01-14 20:40 UTC (permalink / raw)
To: Michael Roth, qemu-devel; +Cc: aliguori, stefanha, mst
Thanks, applied.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] dataplane: fix build breakage on set_guest_notifiers()
2013-01-14 19:20 ` [Qemu-devel] [PATCH 2/2] dataplane: fix build breakage on set_guest_notifiers() Michael Roth
@ 2013-01-15 7:23 ` Stefan Hajnoczi
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Hajnoczi @ 2013-01-15 7:23 UTC (permalink / raw)
To: Michael Roth; +Cc: aliguori, qemu-devel, stefanha, mst
On Mon, Jan 14, 2013 at 01:20:13PM -0600, Michael Roth wrote:
> virtio_pci_set_guest_notifiers() now takes an additional argument to
> specify the number of virtqueues to assign a guest notifier for. This
> causes a build breakage for CONFIG_VIRTIO_BLK_DATA_PLANE builds:
>
> /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function
> ‘virtio_blk_data_plane_start’:
> /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:451:47: error: too
> few arguments to function ‘s->vdev->binding->set_guest_notifiers’
> /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function
> ‘virtio_blk_data_plane_stop’:
> /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:511:5: error: too few
> arguments to function ‘s->vdev->binding->set_guest_notifiers’
> make[1]: *** [hw/dataplane/virtio-blk.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [subdir-x86_64-softmmu] Error 2
>
> Fix this by passing 1 as the number of virtqueues to assign notifiers
> for.
>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
> hw/dataplane/virtio-blk.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Thanks for the fix, Mike!
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-01-15 7:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 19:20 [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages Michael Roth
2013-01-14 19:20 ` [Qemu-devel] [PATCH 1/2] virtio-pci: build for uninitialized return value in vq_vector_unmask Michael Roth
2013-01-14 19:35 ` Eduardo Habkost
2013-01-14 19:37 ` Anthony Liguori
2013-01-14 19:54 ` Michael S. Tsirkin
2013-01-14 19:20 ` [Qemu-devel] [PATCH 2/2] dataplane: fix build breakage on set_guest_notifiers() Michael Roth
2013-01-15 7:23 ` Stefan Hajnoczi
2013-01-14 20:40 ` [Qemu-devel] [PATCH 0/2] fix virtio-related build breakages 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).