* [PATCH 0/3] tools/virtio: build fixes for virtio_test
@ 2014-02-11 6:28 Joel Stanley
2014-02-11 6:28 ` [PATCH 1/3] tools/virtio: update internal copies of headers Joel Stanley
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Joel Stanley @ 2014-02-11 6:28 UTC (permalink / raw)
To: rusty, mst, virtio-dev, virtualization
Recent changes to drivers/virtio broke compilation for the tests in
tools/virtio. The following patches are build fixes for those changes, as well
as a fix for a typo that would have never built.
The changes were tested on my amd64 system against 3.14-rc2.
Joel Stanley (3):
tools/virtio: update internal copies of headers
tools/virtio: fix missing kmemleak_ignore symbol
tools/virtio: add a missing )
drivers/virtio/virtio_ring.c | 1 +
tools/virtio/linux/kmemleak.h | 3 +++
tools/virtio/linux/virtio.h | 4 ++--
tools/virtio/virtio_test.c | 2 +-
4 files changed, 7 insertions(+), 3 deletions(-)
create mode 100644 tools/virtio/linux/kmemleak.h
--
1.9.rc1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] tools/virtio: update internal copies of headers
2014-02-11 6:28 [PATCH 0/3] tools/virtio: build fixes for virtio_test Joel Stanley
@ 2014-02-11 6:28 ` Joel Stanley
2014-02-11 6:28 ` [PATCH 2/3] tools/virtio: fix missing kmemleak_ignore symbol Joel Stanley
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Joel Stanley @ 2014-02-11 6:28 UTC (permalink / raw)
To: rusty, mst, virtio-dev, virtualization
The virtio headers have changed recently:
5b1bf7cb673 virtio_ring: let virtqueue_{kick()/notify()} return a bool
46f9c2b925a virtio_ring: change host notification API
Update the internal copies to fix the build of virtio_test:
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -fno-strict-aliasing -fno-common -MMD -U_FORTIFY_SOURCE
-c -o virtio_test.o virtio_test.c
In file included from virtio_test.c:15:0:
./linux/virtio.h:76:19: error: conflicting types for ‘vring_new_virtqueue’
struct virtqueue *vring_new_virtqueue(unsigned int index,
^
In file included from ./linux/virtio_ring.h:1:0,
from ../../usr/include/linux/vhost.h:17,
from virtio_test.c:14:
./linux/../../../include/linux/virtio_ring.h:68:19: note: previous
declaration of ‘vring_new_virtqueue’ was here
struct virtqueue *vring_new_virtqueue(unsigned int index,
virtio_test.c: In function ‘vq_info_add’:
virtio_test.c:103:12: warning: passing argument 7 of ‘vring_new_virtqueue’
from incompatible pointer type [enabled by default]
vq_notify, vq_callback, "test");
^
In file included from virtio_test.c:15:0:
./linux/virtio.h:76:19: note: expected ‘void (*)(struct virtqueue *)’ but
argument is of type ‘_Bool (*)(struct virtqueue *)’
struct virtqueue *vring_new_virtqueue(unsigned int index,
^
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/virtio/linux/virtio.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h
index 8447830..5a2d1f0 100644
--- a/tools/virtio/linux/virtio.h
+++ b/tools/virtio/linux/virtio.h
@@ -63,7 +63,7 @@ int virtqueue_add_inbuf(struct virtqueue *vq,
void *data,
gfp_t gfp);
-void virtqueue_kick(struct virtqueue *vq);
+bool virtqueue_kick(struct virtqueue *vq);
void *virtqueue_get_buf(struct virtqueue *vq, unsigned int *len);
@@ -79,7 +79,7 @@ struct virtqueue *vring_new_virtqueue(unsigned int index,
struct virtio_device *vdev,
bool weak_barriers,
void *pages,
- void (*notify)(struct virtqueue *vq),
+ bool (*notify)(struct virtqueue *vq),
void (*callback)(struct virtqueue *vq),
const char *name);
void vring_del_virtqueue(struct virtqueue *vq);
--
1.9.rc1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] tools/virtio: fix missing kmemleak_ignore symbol
2014-02-11 6:28 [PATCH 0/3] tools/virtio: build fixes for virtio_test Joel Stanley
2014-02-11 6:28 ` [PATCH 1/3] tools/virtio: update internal copies of headers Joel Stanley
@ 2014-02-11 6:28 ` Joel Stanley
2014-02-11 6:28 ` [PATCH 3/3] tools/virtio: add a missing ) Joel Stanley
2014-02-11 6:57 ` [PATCH 0/3] tools/virtio: build fixes for virtio_test Michael S. Tsirkin
3 siblings, 0 replies; 8+ messages in thread
From: Joel Stanley @ 2014-02-11 6:28 UTC (permalink / raw)
To: rusty, mst, virtio-dev, virtualization
In commit bb478d8b167 virtio_ring: plug kmemleak false positive,
kmemleak_ignore was introduced. This broke compilation of virtio_test:
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -fno-strict-aliasing -fno-common -MMD
-U_FORTIFY_SOURCE -c -o virtio_ring.o ../../drivers/virtio/virtio_ring.c
../../drivers/virtio/virtio_ring.c: In function ‘vring_add_indirect’:
../../drivers/virtio/virtio_ring.c:177:2: warning: implicit declaration
of function ‘kmemleak_ignore’ [-Wimplicit-function-declaration]
kmemleak_ignore(desc);
^
cc virtio_test.o virtio_ring.o -o virtio_test
virtio_ring.o: In function `vring_add_indirect':
tools/virtio/../../drivers/virtio/virtio_ring.c:177:
undefined reference to `kmemleak_ignore'
Add a dummy header for tools/virtio, and add #incldue <linux/kmemleak.h>
to drivers/virtio/virtio_ring.c so it is picked up by the userspace
tools.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
drivers/virtio/virtio_ring.c | 1 +
tools/virtio/linux/kmemleak.h | 3 +++
2 files changed, 4 insertions(+)
create mode 100644 tools/virtio/linux/kmemleak.h
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 28b5338..7ae3cba 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -23,6 +23,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/hrtimer.h>
+#include <linux/kmemleak.h>
#ifdef DEBUG
/* For development, we want to crash whenever the ring is screwed. */
diff --git a/tools/virtio/linux/kmemleak.h b/tools/virtio/linux/kmemleak.h
new file mode 100644
index 0000000..c070722
--- /dev/null
+++ b/tools/virtio/linux/kmemleak.h
@@ -0,0 +1,3 @@
+static inline void kmemleak_ignore(const void *ptr)
+{
+}
--
1.9.rc1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] tools/virtio: add a missing )
2014-02-11 6:28 [PATCH 0/3] tools/virtio: build fixes for virtio_test Joel Stanley
2014-02-11 6:28 ` [PATCH 1/3] tools/virtio: update internal copies of headers Joel Stanley
2014-02-11 6:28 ` [PATCH 2/3] tools/virtio: fix missing kmemleak_ignore symbol Joel Stanley
@ 2014-02-11 6:28 ` Joel Stanley
2014-02-11 6:57 ` [PATCH 0/3] tools/virtio: build fixes for virtio_test Michael S. Tsirkin
3 siblings, 0 replies; 8+ messages in thread
From: Joel Stanley @ 2014-02-11 6:28 UTC (permalink / raw)
To: rusty, mst, virtio-dev, virtualization
Fixes the following build failure:
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -fno-strict-aliasing -fno-common -MMD
-U_FORTIFY_SOURCE -c -o virtio_test.o virtio_test.c
virtio_test.c: In function ‘run_test’:
virtio_test.c:176:7: error: expected ‘)’ before ‘r’
r = -1;
^
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
tools/virtio/virtio_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c
index bdb71a2..00ea679 100644
--- a/tools/virtio/virtio_test.c
+++ b/tools/virtio/virtio_test.c
@@ -172,7 +172,7 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq,
GFP_ATOMIC);
if (likely(r == 0)) {
++started;
- if (unlikely(!virtqueue_kick(vq->vq))
+ if (unlikely(!virtqueue_kick(vq->vq)))
r = -1;
}
} else
--
1.9.rc1
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] tools/virtio: build fixes for virtio_test
2014-02-11 6:28 [PATCH 0/3] tools/virtio: build fixes for virtio_test Joel Stanley
` (2 preceding siblings ...)
2014-02-11 6:28 ` [PATCH 3/3] tools/virtio: add a missing ) Joel Stanley
@ 2014-02-11 6:57 ` Michael S. Tsirkin
2014-02-13 4:28 ` Rusty Russell
2014-02-13 4:40 ` Rusty Russell
3 siblings, 2 replies; 8+ messages in thread
From: Michael S. Tsirkin @ 2014-02-11 6:57 UTC (permalink / raw)
To: Joel Stanley; +Cc: virtio-dev, virtualization
On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote:
> Recent changes to drivers/virtio broke compilation for the tests in
> tools/virtio. The following patches are build fixes for those changes, as well
> as a fix for a typo that would have never built.
>
> The changes were tested on my amd64 system against 3.14-rc2.
Ah, thanks a lot for posting this.
I had this fixed in my tree but forgot to send.
For the series:
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Rusty, will you pick this up?
> Joel Stanley (3):
> tools/virtio: update internal copies of headers
> tools/virtio: fix missing kmemleak_ignore symbol
> tools/virtio: add a missing )
>
> drivers/virtio/virtio_ring.c | 1 +
> tools/virtio/linux/kmemleak.h | 3 +++
> tools/virtio/linux/virtio.h | 4 ++--
> tools/virtio/virtio_test.c | 2 +-
> 4 files changed, 7 insertions(+), 3 deletions(-)
> create mode 100644 tools/virtio/linux/kmemleak.h
>
> --
> 1.9.rc1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] tools/virtio: build fixes for virtio_test
2014-02-11 6:57 ` [PATCH 0/3] tools/virtio: build fixes for virtio_test Michael S. Tsirkin
@ 2014-02-13 4:28 ` Rusty Russell
2014-02-13 4:40 ` Rusty Russell
1 sibling, 0 replies; 8+ messages in thread
From: Rusty Russell @ 2014-02-13 4:28 UTC (permalink / raw)
To: Michael S. Tsirkin, Joel Stanley; +Cc: virtio-dev, virtualization
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote:
>> Recent changes to drivers/virtio broke compilation for the tests in
>> tools/virtio. The following patches are build fixes for those changes, as well
>> as a fix for a typo that would have never built.
>>
>> The changes were tested on my amd64 system against 3.14-rc2.
>
> Ah, thanks a lot for posting this.
> I had this fixed in my tree but forgot to send.
> For the series:
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>
> Rusty, will you pick this up?
Applied.
Thanks,
Rusty.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] tools/virtio: build fixes for virtio_test
2014-02-11 6:57 ` [PATCH 0/3] tools/virtio: build fixes for virtio_test Michael S. Tsirkin
2014-02-13 4:28 ` Rusty Russell
@ 2014-02-13 4:40 ` Rusty Russell
2014-02-13 11:05 ` Heinz Graalfs
1 sibling, 1 reply; 8+ messages in thread
From: Rusty Russell @ 2014-02-13 4:40 UTC (permalink / raw)
To: Michael S. Tsirkin, Joel Stanley; +Cc: virtio-dev, virtualization
"Michael S. Tsirkin" <mst@redhat.com> writes:
> On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote:
>> Recent changes to drivers/virtio broke compilation for the tests in
>> tools/virtio. The following patches are build fixes for those changes, as well
>> as a fix for a typo that would have never built.
>>
>> The changes were tested on my amd64 system against 3.14-rc2.
>
> Ah, thanks a lot for posting this.
> I had this fixed in my tree but forgot to send.
> For the series:
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>
> Rusty, will you pick this up?
Hmm, add added:
Fixes: 53c18c9906441 (virtio_test: verify if virtqueue_kick() succeeded)
Cc: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Heinz, you didn't compile test your patch.
Insert angry-Torvalds-face here,
Rusty.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] tools/virtio: build fixes for virtio_test
2014-02-13 4:40 ` Rusty Russell
@ 2014-02-13 11:05 ` Heinz Graalfs
0 siblings, 0 replies; 8+ messages in thread
From: Heinz Graalfs @ 2014-02-13 11:05 UTC (permalink / raw)
To: Rusty Russell, Michael S. Tsirkin, Joel Stanley
Cc: virtio-dev, virtualization
On 13/02/14 05:40, Rusty Russell wrote:
> "Michael S. Tsirkin" <mst@redhat.com> writes:
>
>> On Tue, Feb 11, 2014 at 04:58:17PM +1030, Joel Stanley wrote:
>>> Recent changes to drivers/virtio broke compilation for the tests in
>>> tools/virtio. The following patches are build fixes for those changes, as well
>>> as a fix for a typo that would have never built.
>>>
>>> The changes were tested on my amd64 system against 3.14-rc2.
>>
>> Ah, thanks a lot for posting this.
>> I had this fixed in my tree but forgot to send.
>> For the series:
>>
>> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>>
>> Rusty, will you pick this up?
>
> Hmm, add added:
>
> Fixes: 53c18c9906441 (virtio_test: verify if virtqueue_kick() succeeded)
> Cc: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
>
> Heinz, you didn't compile test your patch.
>
> Insert angry-Torvalds-face here,
> Rusty.
>
Rusty, yes, I missed to compile the test module.
I'm sorry.
Heinz
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-02-13 11:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 6:28 [PATCH 0/3] tools/virtio: build fixes for virtio_test Joel Stanley
2014-02-11 6:28 ` [PATCH 1/3] tools/virtio: update internal copies of headers Joel Stanley
2014-02-11 6:28 ` [PATCH 2/3] tools/virtio: fix missing kmemleak_ignore symbol Joel Stanley
2014-02-11 6:28 ` [PATCH 3/3] tools/virtio: add a missing ) Joel Stanley
2014-02-11 6:57 ` [PATCH 0/3] tools/virtio: build fixes for virtio_test Michael S. Tsirkin
2014-02-13 4:28 ` Rusty Russell
2014-02-13 4:40 ` Rusty Russell
2014-02-13 11:05 ` Heinz Graalfs
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.