aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/lguest.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/lguest.h')
-rw-r--r--include/linux/lguest.h39
1 files changed, 25 insertions, 14 deletions
diff --git a/include/linux/lguest.h b/include/linux/lguest.h
index 7bc1440fc473..2fb1dcbcb5aa 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,41 @@
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:032 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.
17struct lguest_data 20:*/
18{ 21struct lguest_data {
19 /* 512 == enabled (same as eflags in normal hardware). The Guest 22 /*
20 * changes interrupts so often that a hypercall is too slow. */ 23 * 512 == enabled (same as eflags in normal hardware). The Guest
24 * changes interrupts so often that a hypercall is too slow.
25 */
21 unsigned int irq_enabled; 26 unsigned int irq_enabled;
22 /* Fine-grained interrupt disabling by the Guest */ 27 /* Fine-grained interrupt disabling by the Guest */
23 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); 28 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS);
24 29
25 /* The Host writes the virtual address of the last page fault here, 30 /*
31 * 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 32 * which saves the Guest a hypercall. CR2 is the native register where
27 * this address would normally be found. */ 33 * this address would normally be found.
34 */
28 unsigned long cr2; 35 unsigned long cr2;
29 36
30 /* Wallclock time set by the Host. */ 37 /* Wallclock time set by the Host. */
31 struct timespec time; 38 struct timespec time;
32 39
33 /* Interrupt pending set by the Host. The Guest should do a hypercall 40 /*
34 * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */ 41 * Interrupt pending set by the Host. The Guest should do a hypercall
42 * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF).
43 */
35 int irq_pending; 44 int irq_pending;
36 45
37 /* Async hypercall ring. Instead of directly making hypercalls, we can 46 /*
47 * Async hypercall ring. Instead of directly making hypercalls, we can
38 * place them in here for processing the next time the Host wants. 48 * place them in here for processing the next time the Host wants.
39 * This batching can be quite efficient. */ 49 * This batching can be quite efficient.
50 */
40 51
41 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ 52 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */
42 u8 hcall_status[LHCALL_RING_SIZE]; 53 u8 hcall_status[LHCALL_RING_SIZE];