ia64/xen-unstable

view xen/include/asm-ia64/domain.h @ 5704:9b73afea874e

Certain types of event channel are now auto-bound to vcpu0 by Xen.
Make sure that xenolinux agrees with this.
author sos22@douglas.cl.cam.ac.uk
date Fri Jul 08 15:35:43 2005 +0000 (2005-07-08)
parents 51d5c1d35710
children ca44d2dbb273 a83ac0806d6b
line source
1 #ifndef __ASM_DOMAIN_H__
2 #define __ASM_DOMAIN_H__
4 #include <linux/thread_info.h>
5 #include <asm/tlb.h>
6 #ifdef CONFIG_VTI
7 #include <asm/vmx_vpd.h>
8 #include <asm/vmmu.h>
9 #include <asm/regionreg.h>
10 #include <public/arch-ia64.h>
11 #endif // CONFIG_VTI
12 #include <xen/list.h>
14 extern void arch_do_createdomain(struct vcpu *);
16 extern void domain_relinquish_resources(struct domain *);
18 #ifdef CONFIG_VTI
19 struct trap_bounce {
20 // TO add, FIXME Eddie
21 };
23 #define PMT_SIZE (32L*1024*1024) // 32M for PMT
24 #endif // CONFIG_VTI
26 struct arch_domain {
27 struct mm_struct *active_mm;
28 struct mm_struct *mm;
29 int metaphysical_rr0;
30 int starting_rid; /* first RID assigned to domain */
31 int ending_rid; /* one beyond highest RID assigned to domain */
32 int rid_bits; /* number of virtual rid bits (default: 18) */
33 int breakimm;
34 #ifdef CONFIG_VTI
35 int imp_va_msb;
36 ia64_rr emul_phy_rr0;
37 ia64_rr emul_phy_rr4;
38 unsigned long *pmt; /* physical to machine table */
39 /*
40 * max_pfn is the maximum page frame in guest physical space, including
41 * inter-middle I/O ranges and memory holes. This is different with
42 * max_pages in domain struct, which indicates maximum memory size
43 */
44 unsigned long max_pfn;
45 unsigned int section_nr;
46 mm_section_t *sections; /* Describe memory hole except for Dom0 */
47 #endif //CONFIG_VTI
48 u64 xen_vastart;
49 u64 xen_vaend;
50 u64 shared_info_va;
51 #ifdef DOMU_AUTO_RESTART
52 u64 image_start;
53 u64 image_len;
54 u64 entry;
55 #endif
56 };
57 #define xen_vastart arch.xen_vastart
58 #define xen_vaend arch.xen_vaend
59 #define shared_info_va arch.shared_info_va
61 struct arch_vcpu {
62 #if 1
63 TR_ENTRY itrs[NITRS];
64 TR_ENTRY dtrs[NDTRS];
65 TR_ENTRY itlb;
66 TR_ENTRY dtlb;
67 unsigned long itlb_pte;
68 unsigned long dtlb_pte;
69 unsigned long irr[4];
70 unsigned long insvc[4];
71 unsigned long iva;
72 unsigned long dcr;
73 unsigned long itc;
74 unsigned long domain_itm;
75 unsigned long domain_itm_last;
76 unsigned long xen_itm;
77 unsigned long xen_timer_interval;
78 #endif
79 void *regs; /* temporary until find a better way to do privops */
80 int metaphysical_rr0; // from arch_domain (so is pinned)
81 int metaphysical_saved_rr0; // from arch_domain (so is pinned)
82 int breakimm; // from arch_domain (so is pinned)
83 int starting_rid; /* first RID assigned to domain */
84 int ending_rid; /* one beyond highest RID assigned to domain */
85 struct mm_struct *active_mm;
86 struct thread_struct _thread; // this must be last
87 #ifdef CONFIG_VTI
88 void (*schedule_tail) (struct vcpu *);
89 struct trap_bounce trap_bounce;
90 thash_cb_t *vtlb;
91 //for phycial emulation
92 unsigned long old_rsc;
93 int mode_flags;
95 struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */
96 #endif // CONFIG_VTI
97 };
99 #define active_mm arch.active_mm
100 //#define thread arch._thread
102 // FOLLOWING FROM linux-2.6.7/include/sched.h
104 struct mm_struct {
105 struct vm_area_struct * mmap; /* list of VMAs */
106 #ifndef XEN
107 struct rb_root mm_rb;
108 #endif
109 struct vm_area_struct * mmap_cache; /* last find_vma result */
110 unsigned long free_area_cache; /* first hole */
111 pgd_t * pgd;
112 atomic_t mm_users; /* How many users with user space? */
113 atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
114 int map_count; /* number of VMAs */
115 #ifndef XEN
116 struct rw_semaphore mmap_sem;
117 #endif
118 spinlock_t page_table_lock; /* Protects task page tables and mm->rss */
120 struct list_head mmlist; /* List of all active mm's. These are globally strung
121 * together off init_mm.mmlist, and are protected
122 * by mmlist_lock
123 */
125 unsigned long start_code, end_code, start_data, end_data;
126 unsigned long start_brk, brk, start_stack;
127 unsigned long arg_start, arg_end, env_start, env_end;
128 unsigned long rss, total_vm, locked_vm;
129 unsigned long def_flags;
131 unsigned long saved_auxv[40]; /* for /proc/PID/auxv */
133 unsigned dumpable:1;
134 #ifdef CONFIG_HUGETLB_PAGE
135 int used_hugetlb;
136 #endif
137 #ifndef XEN
138 cpumask_t cpu_vm_mask;
140 /* Architecture-specific MM context */
141 mm_context_t context;
143 /* coredumping support */
144 int core_waiters;
145 struct completion *core_startup_done, core_done;
147 /* aio bits */
148 rwlock_t ioctx_list_lock;
149 struct kioctx *ioctx_list;
151 struct kioctx default_kioctx;
152 #endif
153 };
155 extern struct mm_struct init_mm;
157 #include <asm/uaccess.h> /* for KERNEL_DS */
158 #include <asm/pgtable.h>
160 #endif /* __ASM_DOMAIN_H__ */
162 /*
163 * Local variables:
164 * mode: C
165 * c-set-style: "BSD"
166 * c-basic-offset: 4
167 * tab-width: 4
168 * indent-tabs-mode: nil
169 * End:
170 */