diff options
author | Sekhar Nori <nsekhar@ti.com> | 2017-04-17 07:12:15 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2017-05-02 16:41:43 -0400 |
commit | 0a12ae4024a5167c30444d722b0cbafbdb5f4b57 (patch) | |
tree | aa8722c2d2d2d2da811bedd2e71ab804ef6383f5 /tools | |
parent | f94682dde5ed23eed13533a37dfce942e60ade4e (diff) |
tools/virtio: fix build breakage
Previous commit ("virtio: add context flag to find vqs")
added a new 'context' flag to vring_new_virtqueue(), but the
corresponding API in tools/virtio/ is not updated causing
build errors due to conflicting declarations.
Bring code in tools/virtio in sync with that in kernel.
I have used 'false' for the value of the new boolean 'context'
flag as that seems to be the best way to preserve existing
behavior.
Tested with:
$ make -C tools/virtio clean all ARCH=x86
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtio/linux/virtio.h | 1 | ||||
-rw-r--r-- | tools/virtio/virtio_test.c | 2 | ||||
-rw-r--r-- | tools/virtio/vringh_test.c | 7 |
3 files changed, 6 insertions, 4 deletions
diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h index 9377c8b4ac16..d8f534025b7f 100644 --- a/tools/virtio/linux/virtio.h +++ b/tools/virtio/linux/virtio.h | |||
@@ -57,6 +57,7 @@ struct virtqueue *vring_new_virtqueue(unsigned int index, | |||
57 | unsigned int vring_align, | 57 | unsigned int vring_align, |
58 | struct virtio_device *vdev, | 58 | struct virtio_device *vdev, |
59 | bool weak_barriers, | 59 | bool weak_barriers, |
60 | bool ctx, | ||
60 | void *pages, | 61 | void *pages, |
61 | bool (*notify)(struct virtqueue *vq), | 62 | bool (*notify)(struct virtqueue *vq), |
62 | void (*callback)(struct virtqueue *vq), | 63 | void (*callback)(struct virtqueue *vq), |
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index e0445898f08f..76d6f583c249 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c | |||
@@ -100,7 +100,7 @@ static void vq_info_add(struct vdev_info *dev, int num) | |||
100 | vring_init(&info->vring, num, info->ring, 4096); | 100 | vring_init(&info->vring, num, info->ring, 4096); |
101 | info->vq = vring_new_virtqueue(info->idx, | 101 | info->vq = vring_new_virtqueue(info->idx, |
102 | info->vring.num, 4096, &dev->vdev, | 102 | info->vring.num, 4096, &dev->vdev, |
103 | true, info->ring, | 103 | true, false, info->ring, |
104 | vq_notify, vq_callback, "test"); | 104 | vq_notify, vq_callback, "test"); |
105 | assert(info->vq); | 105 | assert(info->vq); |
106 | info->vq->priv = info; | 106 | info->vq->priv = info; |
diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c index 5f94f5105678..9476c616d064 100644 --- a/tools/virtio/vringh_test.c +++ b/tools/virtio/vringh_test.c | |||
@@ -314,7 +314,8 @@ static int parallel_test(u64 features, | |||
314 | err(1, "Could not set affinity to cpu %u", first_cpu); | 314 | err(1, "Could not set affinity to cpu %u", first_cpu); |
315 | 315 | ||
316 | vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &gvdev.vdev, true, | 316 | vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &gvdev.vdev, true, |
317 | guest_map, fast_vringh ? no_notify_host | 317 | false, guest_map, |
318 | fast_vringh ? no_notify_host | ||
318 | : parallel_notify_host, | 319 | : parallel_notify_host, |
319 | never_callback_guest, "guest vq"); | 320 | never_callback_guest, "guest vq"); |
320 | 321 | ||
@@ -479,7 +480,7 @@ int main(int argc, char *argv[]) | |||
479 | memset(__user_addr_min, 0, vring_size(RINGSIZE, ALIGN)); | 480 | memset(__user_addr_min, 0, vring_size(RINGSIZE, ALIGN)); |
480 | 481 | ||
481 | /* Set up guest side. */ | 482 | /* Set up guest side. */ |
482 | vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &vdev, true, | 483 | vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &vdev, true, false, |
483 | __user_addr_min, | 484 | __user_addr_min, |
484 | never_notify_host, never_callback_guest, | 485 | never_notify_host, never_callback_guest, |
485 | "guest vq"); | 486 | "guest vq"); |
@@ -663,7 +664,7 @@ int main(int argc, char *argv[]) | |||
663 | /* Force creation of direct, which we modify. */ | 664 | /* Force creation of direct, which we modify. */ |
664 | __virtio_clear_bit(&vdev, VIRTIO_RING_F_INDIRECT_DESC); | 665 | __virtio_clear_bit(&vdev, VIRTIO_RING_F_INDIRECT_DESC); |
665 | vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &vdev, true, | 666 | vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &vdev, true, |
666 | __user_addr_min, | 667 | false, __user_addr_min, |
667 | never_notify_host, | 668 | never_notify_host, |
668 | never_callback_guest, | 669 | never_callback_guest, |
669 | "guest vq"); | 670 | "guest vq"); |