X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fvirtio%2Fvirtio_test.c;h=e0445898f08fa981d372d4de6bad4eebe265cb15;hb=71d279801cbef49aa6d5c2355c5015aee4a4c6e2;hp=db3437c641a64c467d3d7f01d84ffdb8670ef4ea;hpb=c0f486fde3f353232c1cc2fd4d62783ac782a467;p=firefly-linux-kernel-4.4.55.git diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index db3437c641a6..e0445898f08f 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -226,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', @@ -243,6 +252,7 @@ static void help(void) fprintf(stderr, "Usage: virtio_test [--help]" " [--no-indirect]" " [--no-event-idx]" + " [--no-virtio-1]" " [--delayed-interrupt]" "\n"); } @@ -251,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; @@ -272,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;