summaryrefslogtreecommitdiff
path: root/tools/virtio/virtio_test.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-14 23:49:16 +0300
committerMichael S. Tsirkin <mst@redhat.com>2014-12-16 00:49:22 +0300
commit43b09122ce6c14d664c2a5f425b051b5936dbde6 (patch)
treef439faf9a9b88dd85a77f20743ab5efaae97a46b /tools/virtio/virtio_test.c
parent1620ecb8b83dc757edd39661f2e215480b7adac7 (diff)
downloadlinux-43b09122ce6c14d664c2a5f425b051b5936dbde6.tar.xz
tools/virtio: add virtio 1.0 in virtio_test
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools/virtio/virtio_test.c')
-rw-r--r--tools/virtio/virtio_test.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c
index 67873c30c5bf..e0445898f08f 100644
--- a/tools/virtio/virtio_test.c
+++ b/tools/virtio/virtio_test.c
@@ -228,6 +228,14 @@ const struct option longopts[] = {
.val = 'i',
},
{
+ .name = "virtio-1",
+ .val = '1',
+ },
+ {
+ .name = "no-virtio-1",
+ .val = '0',
+ },
+ {
.name = "delayed-interrupt",
.val = 'D',
},
@@ -244,6 +252,7 @@ static void help(void)
fprintf(stderr, "Usage: virtio_test [--help]"
" [--no-indirect]"
" [--no-event-idx]"
+ " [--no-virtio-1]"
" [--delayed-interrupt]"
"\n");
}
@@ -252,7 +261,7 @@ int main(int argc, char **argv)
{
struct vdev_info dev;
unsigned long long features = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
- (1ULL << VIRTIO_RING_F_EVENT_IDX);
+ (1ULL << VIRTIO_RING_F_EVENT_IDX) | (1ULL << VIRTIO_F_VERSION_1);
int o;
bool delayed = false;
@@ -273,6 +282,9 @@ int main(int argc, char **argv)
case 'i':
features &= ~(1ULL << VIRTIO_RING_F_INDIRECT_DESC);
break;
+ case '0':
+ features &= ~(1ULL << VIRTIO_F_VERSION_1);
+ break;
case 'D':
delayed = true;
break;