acpi_pad: build only on X86
[linux-2.6/linux-acpi-2.6.git] / include / linux / lguest.h
blobdbf2479e808ef30e650cd23b2f52755a4cb22c37
1 /* Things the lguest guest needs to know. Note: like all lguest interfaces,
2 * this is subject to wild and random change between versions. */
3 #ifndef _LINUX_LGUEST_H
4 #define _LINUX_LGUEST_H
6 #ifndef __ASSEMBLY__
7 #include <linux/time.h>
8 #include <asm/irq.h>
9 #include <asm/lguest_hcall.h>
11 #define LG_CLOCK_MIN_DELTA 100UL
12 #define LG_CLOCK_MAX_DELTA ULONG_MAX
14 /*G:031 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
16 * this is, the Guest and Host both publish information in it. :*/
17 struct lguest_data
19 /* 512 == enabled (same as eflags in normal hardware). The Guest
20 * changes interrupts so often that a hypercall is too slow. */
21 unsigned int irq_enabled;
22 /* Fine-grained interrupt disabling by the Guest */
23 DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS);
25 /* 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
27 * this address would normally be found. */
28 unsigned long cr2;
30 /* Wallclock time set by the Host. */
31 struct timespec time;
33 /* Interrupt pending set by the Host. The Guest should do a hypercall
34 * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */
35 int irq_pending;
37 /* Async hypercall ring. Instead of directly making hypercalls, we can
38 * place them in here for processing the next time the Host wants.
39 * This batching can be quite efficient. */
41 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */
42 u8 hcall_status[LHCALL_RING_SIZE];
43 /* The actual registers for the hypercalls. */
44 struct hcall_args hcalls[LHCALL_RING_SIZE];
46 /* Fields initialized by the Host at boot: */
47 /* Memory not to try to access */
48 unsigned long reserve_mem;
49 /* KHz for the TSC clock. */
50 u32 tsc_khz;
51 /* Page where the top-level pagetable is */
52 unsigned long pgdir;
54 /* Fields initialized by the Guest at boot: */
55 /* Instruction range to suppress interrupts even if enabled */
56 unsigned long noirq_start, noirq_end;
57 /* Address above which page tables are all identical. */
58 unsigned long kernel_address;
59 /* The vector to try to use for system calls (0x40 or 0x80). */
60 unsigned int syscall_vec;
62 extern struct lguest_data lguest_data;
63 #endif /* __ASSEMBLY__ */
64 #endif /* _LINUX_LGUEST_H */