aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-07-30 18:03:45 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-07-30 02:33:45 -0400
commit2e04ef76916d1e29a077ea9d0f2003c8fd86724d (patch)
tree2ff8d625d6e467be9f9f1b67a3674cb6e125e970 /include/linux
parente969fed542cae08cb11d666efac4f7c5d624d09f (diff)
lguest: fix comment style
I don't really notice it (except to begrudge the extra vertical space), but Ingo does. And he pointed out that one excuse of lguest is as a teaching tool, it should set a good example. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/lguest.h36
-rw-r--r--include/linux/lguest_launcher.h18
2 files changed, 36 insertions, 18 deletions
diff --git a/include/linux/lguest.h b/include/linux/lguest.h
index dbf2479e808e..0a3a11afd64b 100644
--- a/include/linux/lguest.h
+++ b/include/linux/lguest.h
@@ -1,5 +1,7 @@
1/* Things the lguest guest needs to know. Note: like all lguest interfaces, 1/*
2 * this is subject to wild and random change between versions. */ 2 * Things the lguest guest needs to know. Note: like all lguest interfaces,
3 * this is subject to wild and random change between versions.
4 */
3#ifndef _LINUX_LGUEST_H 5#ifndef _LINUX_LGUEST_H
4#define _LINUX_LGUEST_H 6#define _LINUX_LGUEST_H
5 7
@@ -11,32 +13,42 @@
11#define LG_CLOCK_MIN_DELTA 100UL 13#define LG_CLOCK_MIN_DELTA 100UL
12#define LG_CLOCK_MAX_DELTA ULONG_MAX 14#define LG_CLOCK_MAX_DELTA ULONG_MAX
13 15
14/*G:031 The second method of communicating with the Host is to via "struct 16/*G:031
17 * The second method of communicating with the Host is to via "struct
15 * lguest_data". Once the Guest's initialization hypercall tells the Host where 18 * lguest_data". Once the Guest's initialization hypercall tells the Host where
16 * this is, the Guest and Host both publish information in it. :*/ 19 * this is, the Guest and Host both publish information in it.
20:*/
17struct lguest_data 21struct lguest_data
18{ 22{
19 /* 512 == enabled (same as eflags in normal hardware). The Guest 23 /*
20 * changes interrupts so often that a hypercall is too slow. */ 24 * 512 == enabled (same as eflags in normal hardware). The Guest
25 * changes interrupts so often that a hypercall is too slow.
26 */
21 unsigned int irq_enabled; 27 unsigned int irq_enabled;
22 /* Fine-grained interrupt disabling by the Guest */ 28 /* Fine-grained interrupt disabling by the Guest */
23 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); 29 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS);
24 30
25 /* The Host writes the virtual address of the last page fault here, 31 /*
32 * The Host writes the virtual address of the last page fault here,
26 * which saves the Guest a hypercall. CR2 is the native register where 33 * which saves the Guest a hypercall. CR2 is the native register where
27 * this address would normally be found. */ 34 * this address would normally be found.
35 */
28 unsigned long cr2; 36 unsigned long cr2;
29 37
30 /* Wallclock time set by the Host. */ 38 /* Wallclock time set by the Host. */
31 struct timespec time; 39 struct timespec time;
32 40
33 /* Interrupt pending set by the Host. The Guest should do a hypercall 41 /*
34 * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */ 42 * Interrupt pending set by the Host. The Guest should do a hypercall
43 * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF).
44 */
35 int irq_pending; 45 int irq_pending;
36 46
37 /* Async hypercall ring. Instead of directly making hypercalls, we can 47 /*
48 * Async hypercall ring. Instead of directly making hypercalls, we can
38 * place them in here for processing the next time the Host wants. 49 * place them in here for processing the next time the Host wants.
39 * This batching can be quite efficient. */ 50 * This batching can be quite efficient.
51 */
40 52
41 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ 53 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */
42 u8 hcall_status[LHCALL_RING_SIZE]; 54 u8 hcall_status[LHCALL_RING_SIZE];
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h
index bfefbdf7498a..495203ff221c 100644
--- a/include/linux/lguest_launcher.h
+++ b/include/linux/lguest_launcher.h
@@ -29,8 +29,10 @@ struct lguest_device_desc {
29 __u8 type; 29 __u8 type;
30 /* The number of virtqueues (first in config array) */ 30 /* The number of virtqueues (first in config array) */
31 __u8 num_vq; 31 __u8 num_vq;
32 /* The number of bytes of feature bits. Multiply by 2: one for host 32 /*
33 * features and one for Guest acknowledgements. */ 33 * The number of bytes of feature bits. Multiply by 2: one for host
34 * features and one for Guest acknowledgements.
35 */
34 __u8 feature_len; 36 __u8 feature_len;
35 /* The number of bytes of the config array after virtqueues. */ 37 /* The number of bytes of the config array after virtqueues. */
36 __u8 config_len; 38 __u8 config_len;
@@ -39,8 +41,10 @@ struct lguest_device_desc {
39 __u8 config[0]; 41 __u8 config[0];
40}; 42};
41 43
42/*D:135 This is how we expect the device configuration field for a virtqueue 44/*D:135
43 * to be laid out in config space. */ 45 * This is how we expect the device configuration field for a virtqueue
46 * to be laid out in config space.
47 */
44struct lguest_vqconfig { 48struct lguest_vqconfig {
45 /* The number of entries in the virtio_ring */ 49 /* The number of entries in the virtio_ring */
46 __u16 num; 50 __u16 num;
@@ -61,7 +65,9 @@ enum lguest_req
61 LHREQ_EVENTFD, /* + address, fd. */ 65 LHREQ_EVENTFD, /* + address, fd. */
62}; 66};
63 67
64/* The alignment to use between consumer and producer parts of vring. 68/*
65 * x86 pagesize for historical reasons. */ 69 * The alignment to use between consumer and producer parts of vring.
70 * x86 pagesize for historical reasons.
71 */
66#define LGUEST_VRING_ALIGN 4096 72#define LGUEST_VRING_ALIGN 4096
67#endif /* _LINUX_LGUEST_LAUNCHER */ 73#endif /* _LINUX_LGUEST_LAUNCHER */