aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lguest_launcher.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-02-04 23:49:56 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-02-04 07:49:57 -0500
commita586d4f6016f7139d8c26df0e6927131168d3b5b (patch)
tree1c47e1a6b6b8fb18baa42f32980f29c4ae9cbbdc /include/linux/lguest_launcher.h
parentf35d9d8aae08940b7fdd1bb8110619da2ece6b28 (diff)
virtio: simplify config mechanism.
Previously we used a type/len pair within the config space, but this seems overkill. We now simply define a structure which represents the layout in the config space: the config space can now only be extended at the end. The main driver-visible changes: 1) We indicate what fields are present with an explicit feature bit. 2) Virtqueues are explicitly numbered, and not in the config space. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/lguest_launcher.h')
-rw-r--r--include/linux/lguest_launcher.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h
index 697104da91f1..589be3e1f3ac 100644
--- a/include/linux/lguest_launcher.h
+++ b/include/linux/lguest_launcher.h
@@ -23,7 +23,12 @@
23struct lguest_device_desc { 23struct lguest_device_desc {
24 /* The device type: console, network, disk etc. Type 0 terminates. */ 24 /* The device type: console, network, disk etc. Type 0 terminates. */
25 __u8 type; 25 __u8 type;
26 /* The number of bytes of the config array. */ 26 /* The number of virtqueues (first in config array) */
27 __u8 num_vq;
28 /* The number of bytes of feature bits. Multiply by 2: one for host
29 * features and one for guest acknowledgements. */
30 __u8 feature_len;
31 /* The number of bytes of the config array after virtqueues. */
27 __u8 config_len; 32 __u8 config_len;
28 /* A status byte, written by the Guest. */ 33 /* A status byte, written by the Guest. */
29 __u8 status; 34 __u8 status;
@@ -31,7 +36,7 @@ struct lguest_device_desc {
31}; 36};
32 37
33/*D:135 This is how we expect the device configuration field for a virtqueue 38/*D:135 This is how we expect the device configuration field for a virtqueue
34 * (type VIRTIO_CONFIG_F_VIRTQUEUE) to be laid out: */ 39 * to be laid out in config space. */
35struct lguest_vqconfig { 40struct lguest_vqconfig {
36 /* The number of entries in the virtio_ring */ 41 /* The number of entries in the virtio_ring */
37 __u16 num; 42 __u16 num;