OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH 07/16] lguest: switch on version1 bit.


From: Rusty Russell <rusty@rustcorp.com.au>


Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
 tools/lguest/lguest.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c
index 68f67cf..4077ace 100644
--- a/tools/lguest/lguest.c
+++ b/tools/lguest/lguest.c
@@ -42,6 +42,10 @@
 #include <pwd.h>
 #include <grp.h>
 
+#ifndef VIRTIO_F_VERSION_1
+#define VIRTIO_F_VERSION_1		32
+#endif
+
 /*L:110
  * We can ignore the 43 include files we need for this program, but I do want
  * to draw attention to the use of kernel-style types.
@@ -1347,6 +1351,9 @@ static void setup_console(void)
 	add_virtqueue(dev, VIRTQUEUE_NUM, console_input);
 	add_virtqueue(dev, VIRTQUEUE_NUM, console_output);
 
+	/* We're compliant with the new damn spec. */
+	add_feature(dev, VIRTIO_F_VERSION_1);
+
 	verbose("device %u: console\n", ++devices.device_num);
 }
 /*:*/
@@ -1544,6 +1551,8 @@ static void setup_tun_net(char *arg)
 	add_feature(dev, VIRTIO_NET_F_HOST_ECN);
 	/* We handle indirect ring entries */
 	add_feature(dev, VIRTIO_RING_F_INDIRECT_DESC);
+	/* We're compliant with the new damn spec. */
+	add_feature(dev, VIRTIO_F_VERSION_1);
 	set_config(dev, sizeof(conf), &conf);
 
 	/* We don't need the socket any more; setup is done. */
@@ -1719,6 +1728,9 @@ static void setup_block_file(const char *filename)
 	add_feature(dev, VIRTIO_BLK_F_SEG_MAX);
 	conf.seg_max = cpu_to_le32(VIRTQUEUE_NUM - 2);
 
+	/* We're compliant with the new damn spec. */
+	add_feature(dev, VIRTIO_F_VERSION_1);
+
 	/* Don't try to put whole struct: we have 8 bit limit. */
 	set_config(dev, offsetof(struct virtio_blk_config, geometry), &conf);
 
@@ -1784,6 +1796,9 @@ static void setup_rng(void)
 	/* The device has one virtqueue, where the Guest places inbufs. */
 	add_virtqueue(dev, VIRTQUEUE_NUM, rng_input);
 
+	/* We're compliant with the new damn spec. */
+	add_feature(dev, VIRTIO_F_VERSION_1);
+
 	verbose("device %u: rng\n", devices.device_num++);
 }
 /* That's the end of device setup. */
-- 
1.8.1.2



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]