]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
tools/virtio: fix build breakage
authorSekhar Nori <nsekhar@ti.com>
Mon, 17 Apr 2017 11:12:15 +0000 (16:42 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 2 May 2017 20:41:43 +0000 (23:41 +0300)
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>
tools/virtio/linux/virtio.h
tools/virtio/virtio_test.c
tools/virtio/vringh_test.c

index 9377c8b4ac167723de43088e96e5b5f0effcf4b2..d8f534025b7f7bd3cb27d663f78de9b232fa85d3 100644 (file)
@@ -57,6 +57,7 @@ struct virtqueue *vring_new_virtqueue(unsigned int index,
                                      unsigned int vring_align,
                                      struct virtio_device *vdev,
                                      bool weak_barriers,
+                                     bool ctx,
                                      void *pages,
                                      bool (*notify)(struct virtqueue *vq),
                                      void (*callback)(struct virtqueue *vq),
index e0445898f08fa981d372d4de6bad4eebe265cb15..76d6f583c249d3585e6af62f8edf3e0ffa480399 100644 (file)
@@ -100,7 +100,7 @@ static void vq_info_add(struct vdev_info *dev, int num)
        vring_init(&info->vring, num, info->ring, 4096);
        info->vq = vring_new_virtqueue(info->idx,
                                       info->vring.num, 4096, &dev->vdev,
-                                      true, info->ring,
+                                      true, false, info->ring,
                                       vq_notify, vq_callback, "test");
        assert(info->vq);
        info->vq->priv = info;
index 5f94f51056781e1f8a662be8db245cfd0285b5a8..9476c616d0642c5e2f0162d4fabd3945a98d4f32 100644 (file)
@@ -314,7 +314,8 @@ static int parallel_test(u64 features,
                        err(1, "Could not set affinity to cpu %u", first_cpu);
 
                vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &gvdev.vdev, true,
-                                        guest_map, fast_vringh ? no_notify_host
+                                        false, guest_map,
+                                        fast_vringh ? no_notify_host
                                         : parallel_notify_host,
                                         never_callback_guest, "guest vq");
 
@@ -479,7 +480,7 @@ int main(int argc, char *argv[])
        memset(__user_addr_min, 0, vring_size(RINGSIZE, ALIGN));
 
        /* Set up guest side. */
-       vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &vdev, true,
+       vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &vdev, true, false,
                                 __user_addr_min,
                                 never_notify_host, never_callback_guest,
                                 "guest vq");
@@ -663,7 +664,7 @@ int main(int argc, char *argv[])
                /* Force creation of direct, which we modify. */
                __virtio_clear_bit(&vdev, VIRTIO_RING_F_INDIRECT_DESC);
                vq = vring_new_virtqueue(0, RINGSIZE, ALIGN, &vdev, true,
-                                        __user_addr_min,
+                                        false, __user_addr_min,
                                         never_notify_host,
                                         never_callback_guest,
                                         "guest vq");