ia64/xen-unstable

view xen/include/asm-x86/domain.h @ 3780:f368e743fc2e

bitkeeper revision 1.1159.1.568 (420ba33bo4Ly13qI5cHgZttHha5_-g)

Change do_set_callbacks hypercall for x86/64 to not take any selector
values, but to take a syscall_entry point.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Thu Feb 10 18:08:59 2005 +0000 (2005-02-10)
parents 118e0a3af9b0
children 1d13ed9582e0
line source
1 /* -*- Mode:C; c-basic-offset:4; tab-width:4; indent-tabs-mode:nil -*- */
3 #ifndef __ASM_DOMAIN_H__
4 #define __ASM_DOMAIN_H__
6 struct trap_bounce {
7 unsigned long error_code;
8 unsigned long cr2;
9 unsigned short flags; /* TBF_ */
10 unsigned short cs;
11 unsigned long eip;
12 };
14 struct arch_domain
15 {
16 l1_pgentry_t *mm_perdomain_pt;
17 #ifdef __x86_64__
18 l2_pgentry_t *mm_perdomain_l2;
19 l3_pgentry_t *mm_perdomain_l3;
20 #endif
22 /* shadow mode status and controls */
23 unsigned int shadow_mode; /* flags to control shadow table operation */
24 spinlock_t shadow_lock;
25 unsigned long min_pfn; /* min host physical */
26 unsigned long max_pfn; /* max host physical */
28 /* shadow hashtable */
29 struct shadow_status *shadow_ht;
30 struct shadow_status *shadow_ht_free;
31 struct shadow_status *shadow_ht_extras; /* extra allocation units */
32 unsigned int shadow_extras_count;
34 /* shadow dirty bitmap */
35 unsigned long *shadow_dirty_bitmap;
36 unsigned int shadow_dirty_bitmap_size; /* in pages, bit per page */
38 /* shadow mode stats */
39 unsigned int shadow_page_count;
40 unsigned int shadow_fault_count;
41 unsigned int shadow_dirty_count;
42 unsigned int shadow_dirty_net_count;
43 unsigned int shadow_dirty_block_count;
44 } __cacheline_aligned;
46 struct arch_exec_domain
47 {
48 unsigned long kernel_sp;
49 unsigned long kernel_ss;
51 unsigned long flags; /* TF_ */
53 /* Hardware debugging registers */
54 unsigned long debugreg[8]; /* %%db0-7 debug registers */
56 /* floating point info */
57 struct i387_state i387;
59 /* general user-visible register state */
60 execution_context_t user_ctxt;
62 void (*schedule_tail) (struct exec_domain *);
64 /*
65 * Return vectors pushed to us by guest OS.
66 * The stack frame for events is exactly that of an x86 hardware interrupt.
67 * The stack frame for a failsafe callback is augmented with saved values
68 * for segment registers %ds, %es, %fs and %gs:
69 * %ds, %es, %fs, %gs, %eip, %cs, %eflags [, %oldesp, %oldss]
70 */
72 unsigned long event_selector; /* entry CS (x86/32 only) */
73 unsigned long event_address; /* entry EIP */
75 unsigned long failsafe_selector; /* entry CS (x86/32 only) */
76 unsigned long failsafe_address; /* entry EIP */
78 unsigned long syscall_address; /* entry EIP (x86/64 only) */
80 /* Bounce information for propagating an exception to guest OS. */
81 struct trap_bounce trap_bounce;
83 /* I/O-port access bitmap. */
84 u64 io_bitmap_sel; /* Selector to tell us which part of the IO bitmap are
85 * "interesting" (i.e. have clear bits) */
86 u8 *io_bitmap; /* Pointer to task's IO bitmap or NULL */
88 /* Trap info. */
89 #ifdef ARCH_HAS_FAST_TRAP
90 int fast_trap_idx;
91 struct desc_struct fast_trap_desc;
92 #endif
93 trap_info_t traps[256];
94 #ifdef CONFIG_VMX
95 struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */
96 #endif
98 /*
99 * Every domain has a L1 pagetable of its own. Per-domain mappings
100 * are put in this table (eg. the current GDT is mapped here).
101 */
102 l1_pgentry_t *perdomain_ptes;
103 pagetable_t pagetable;
104 pagetable_t pagetable_user; /* x86/64: user-space pagetable. */
106 pagetable_t monitor_table;
107 pagetable_t phys_table; /* 1:1 pagetable */
108 pagetable_t shadow_table;
109 l2_pgentry_t *vpagetable; /* virtual address of pagetable */
110 l2_pgentry_t *shadow_vtable; /* virtual address of shadow_table */
111 l2_pgentry_t *guest_pl2e_cache; /* guest page directory cache */
113 /* Virtual CR2 value. Can be read/written by guest. */
114 unsigned long guest_cr2;
116 /* Current LDT details. */
117 unsigned long ldt_base, ldt_ents, shadow_ldt_mapcnt;
118 /* Next entry is passed to LGDT on domain switch. */
119 char gdt[10]; /* NB. 10 bytes needed for x86_64. Use 6 bytes for x86_32. */
120 } __cacheline_aligned;
122 #define IDLE0_ARCH_EXEC_DOMAIN \
123 { \
124 perdomain_ptes: 0, \
125 pagetable: mk_pagetable(__pa(idle_pg_table)) \
126 }
128 #endif /* __ASM_DOMAIN_H__ */