Skip to content

Commit

Permalink
tools/virtio: add virtio 1.0 in virtio_test
Browse files Browse the repository at this point in the history
Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
mstsirkin committed Dec 15, 2014
1 parent 1620ecb commit 43b0912
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tools/virtio/virtio_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ const struct option longopts[] = {
.name = "no-indirect",
.val = 'i',
},
{
.name = "virtio-1",
.val = '1',
},
{
.name = "no-virtio-1",
.val = '0',
},
{
.name = "delayed-interrupt",
.val = 'D',
Expand All @@ -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");
}
Expand All @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 43b0912

Please sign in to comment.