]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/linux/lguest.h
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
7 #include <linux/time.h>
9 #include <asm/lguest_hcall.h>
11 #define LG_CLOCK_MIN_DELTA 100UL
12 #define LG_CLOCK_MAX_DELTA ULONG_MAX
14 /*G:032 The second method of communicating with the Host is to via "struct
15 * lguest_data". The Guest's very first hypercall is to tell the Host where
16 * this is, and then the Guest and Host both publish information in it. :*/
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. */
30 /* Wallclock time set by the Host. */
33 /* Async hypercall ring. Instead of directly making hypercalls, we can
34 * place them in here for processing the next time the Host wants.
35 * This batching can be quite efficient. */
37 /* 0xFF == done (set by Host), 0 == pending (set by Guest). */
38 u8 hcall_status
[LHCALL_RING_SIZE
];
39 /* The actual registers for the hypercalls. */
40 struct hcall_args hcalls
[LHCALL_RING_SIZE
];
42 /* Fields initialized by the Host at boot: */
43 /* Memory not to try to access */
44 unsigned long reserve_mem
;
45 /* KHz for the TSC clock. */
48 /* Fields initialized by the Guest at boot: */
49 /* Instruction range to suppress interrupts even if enabled */
50 unsigned long noirq_start
, noirq_end
;
52 extern struct lguest_data lguest_data
;
53 #endif /* __ASSEMBLY__ */
54 #endif /* _LINUX_LGUEST_H */