aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-14 15:49:16 -0500
committerMichael S. Tsirkin <mst@redhat.com>2014-12-15 16:49:22 -0500
commit43b09122ce6c14d664c2a5f425b051b5936dbde6 (patch)
treef439faf9a9b88dd85a77f20743ab5efaae97a46b /tools
parent1620ecb8b83dc757edd39661f2e215480b7adac7 (diff)
tools/virtio: add virtio 1.0 in virtio_test
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tools')
-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[] = {
228 .val = 'i', 228 .val = 'i',
229 }, 229 },
230 { 230 {
231 .name = "virtio-1",
232 .val = '1',
233 },
234 {
235 .name = "no-virtio-1",
236 .val = '0',
237 },
238 {
231 .name = "delayed-interrupt", 239 .name = "delayed-interrupt",
232 .val = 'D', 240 .val = 'D',
233 }, 241 },
@@ -244,6 +252,7 @@ static void help(void)
244 fprintf(stderr, "Usage: virtio_test [--help]" 252 fprintf(stderr, "Usage: virtio_test [--help]"
245 " [--no-indirect]" 253 " [--no-indirect]"
246 " [--no-event-idx]" 254 " [--no-event-idx]"
255 " [--no-virtio-1]"
247 " [--delayed-interrupt]" 256 " [--delayed-interrupt]"
248 "\n"); 257 "\n");
249} 258}
@@ -252,7 +261,7 @@ int main(int argc, char **argv)
252{ 261{
253 struct vdev_info dev; 262 struct vdev_info dev;
254 unsigned long long features = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | 263 unsigned long long features = (1ULL << VIRTIO_RING_F_INDIRECT_DESC) |
255 (1ULL << VIRTIO_RING_F_EVENT_IDX); 264 (1ULL << VIRTIO_RING_F_EVENT_IDX) | (1ULL << VIRTIO_F_VERSION_1);
256 int o; 265 int o;
257 bool delayed = false; 266 bool delayed = false;
258 267
@@ -273,6 +282,9 @@ int main(int argc, char **argv)
273 case 'i': 282 case 'i':
274 features &= ~(1ULL << VIRTIO_RING_F_INDIRECT_DESC); 283 features &= ~(1ULL << VIRTIO_RING_F_INDIRECT_DESC);
275 break; 284 break;
285 case '0':
286 features &= ~(1ULL << VIRTIO_F_VERSION_1);
287 break;
276 case 'D': 288 case 'D':
277 delayed = true; 289 delayed = true;
278 break; 290 break;