lguest: fix comment style
[linux-2.6/libata-dev.git] / include / linux / lguest.h
blob0a3a11afd64b3a8d8bfe1b4a6b314ce18bffc971
1 /*
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 */
5 #ifndef _LINUX_LGUEST_H
6 #define _LINUX_LGUEST_H
8 #ifndef __ASSEMBLY__
9 #include <linux/time.h>
10 #include <asm/irq.h>
11 #include <asm/lguest_hcall.h>
13 #define LG_CLOCK_MIN_DELTA 100UL
14 #define LG_CLOCK_MAX_DELTA ULONG_MAX
16 /*G:031
17 * The second method of communicating with the Host is to via "struct
18 * lguest_data". Once the Guest's initialization hypercall tells the Host where
19 * this is, the Guest and Host both publish information in it.
20 :*/
21 struct lguest_data
24 * 512 == enabled (same as eflags in normal hardware). The Guest
25 * changes interrupts so often that a hypercall is too slow.
27 unsigned int irq_enabled;
28 /* Fine-grained interrupt disabling by the Guest */
29 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS);
32 * The Host writes the virtual address of the last page fault here,
33 * which saves the Guest a hypercall. CR2 is the native register where
34 * this address would normally be found.
36 unsigned long cr2;
38 /* Wallclock time set by the Host. */
39 struct timespec time;
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).
45 int irq_pending;
48 * Async hypercall ring. Instead of directly making hypercalls, we can
49 * place them in here for processing the next time the Host wants.
50 * This batching can be quite efficient.
53 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */
54 u8 hcall_status[LHCALL_RING_SIZE];
55 /* The actual registers for the hypercalls. */
56 struct hcall_args hcalls[LHCALL_RING_SIZE];
58 /* Fields initialized by the Host at boot: */
59 /* Memory not to try to access */
60 unsigned long reserve_mem;
61 /* KHz for the TSC clock. */
62 u32 tsc_khz;
63 /* Page where the top-level pagetable is */
64 unsigned long pgdir;
66 /* Fields initialized by the Guest at boot: */
67 /* Instruction range to suppress interrupts even if enabled */
68 unsigned long noirq_start, noirq_end;
69 /* Address above which page tables are all identical. */
70 unsigned long kernel_address;
71 /* The vector to try to use for system calls (0x40 or 0x80). */
72 unsigned int syscall_vec;
74 extern struct lguest_data lguest_data;
75 #endif /* __ASSEMBLY__ */
76 #endif /* _LINUX_LGUEST_H */