ia64/xen-unstable

view xen/include/asm-ia64/domain.h @ 6538:84ee014ebd41

Merge xen-vtx-unstable.hg
author adsharma@los-vmm.sc.intel.com
date Wed Aug 17 12:34:38 2005 -0800 (2005-08-17)
parents 23979fb12c49 f294acb25858
children 99914b54f7bf
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 #include <asm/vmx_platform.h>
12 #endif // CONFIG_VTI
13 #include <xen/list.h>
15 extern void arch_do_createdomain(struct vcpu *);
17 extern void domain_relinquish_resources(struct domain *);
19 #ifdef CONFIG_VTI
20 struct trap_bounce {
21 // TO add, FIXME Eddie
22 };
24 #define PMT_SIZE (32L*1024*1024) // 32M for PMT
25 #endif // CONFIG_VTI
27 struct arch_domain {
28 struct mm_struct *active_mm;
29 struct mm_struct *mm;
30 int metaphysical_rr0;
31 int starting_rid; /* first RID assigned to domain */
32 int ending_rid; /* one beyond highest RID assigned to domain */
33 int rid_bits; /* number of virtual rid bits (default: 18) */
34 int breakimm;
35 #ifdef CONFIG_VTI
36 int imp_va_msb;
37 ia64_rr emul_phy_rr0;
38 ia64_rr emul_phy_rr4;
39 unsigned long *pmt; /* physical to machine table */
40 /*
41 * max_pfn is the maximum page frame in guest physical space, including
42 * inter-middle I/O ranges and memory holes. This is different with
43 * max_pages in domain struct, which indicates maximum memory size
44 */
45 unsigned long max_pfn;
46 struct virutal_platform_def vmx_platform;
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 char irq_new_pending;
92 char irq_new_condition; // vpsr.i/vtpr change, check for pending VHPI
93 char hypercall_continuation;
94 //for phycial emulation
95 unsigned long old_rsc;
96 int mode_flags;
98 struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */
99 #endif // CONFIG_VTI
100 };
102 #define active_mm arch.active_mm
103 //#define thread arch._thread
105 // FOLLOWING FROM linux-2.6.7/include/sched.h
107 struct mm_struct {
108 struct vm_area_struct * mmap; /* list of VMAs */
109 #ifndef XEN
110 struct rb_root mm_rb;
111 #endif
112 struct vm_area_struct * mmap_cache; /* last find_vma result */
113 unsigned long free_area_cache; /* first hole */
114 pgd_t * pgd;
115 atomic_t mm_users; /* How many users with user space? */
116 atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
117 int map_count; /* number of VMAs */
118 #ifndef XEN
119 struct rw_semaphore mmap_sem;
120 #endif
121 spinlock_t page_table_lock; /* Protects task page tables and mm->rss */
123 struct list_head mmlist; /* List of all active mm's. These are globally strung
124 * together off init_mm.mmlist, and are protected
125 * by mmlist_lock
126 */
128 unsigned long start_code, end_code, start_data, end_data;
129 unsigned long start_brk, brk, start_stack;
130 unsigned long arg_start, arg_end, env_start, env_end;
131 unsigned long rss, total_vm, locked_vm;
132 unsigned long def_flags;
134 unsigned long saved_auxv[40]; /* for /proc/PID/auxv */
136 unsigned dumpable:1;
137 #ifdef CONFIG_HUGETLB_PAGE
138 int used_hugetlb;
139 #endif
140 #ifndef XEN
141 cpumask_t cpu_vm_mask;
143 /* Architecture-specific MM context */
144 mm_context_t context;
146 /* coredumping support */
147 int core_waiters;
148 struct completion *core_startup_done, core_done;
150 /* aio bits */
151 rwlock_t ioctx_list_lock;
152 struct kioctx *ioctx_list;
154 struct kioctx default_kioctx;
155 #endif
156 };
158 extern struct mm_struct init_mm;
160 #include <asm/uaccess.h> /* for KERNEL_DS */
161 #include <asm/pgtable.h>
163 #endif /* __ASM_DOMAIN_H__ */
165 /*
166 * Local variables:
167 * mode: C
168 * c-set-style: "BSD"
169 * c-basic-offset: 4
170 * tab-width: 4
171 * indent-tabs-mode: nil
172 * End:
173 */