ia64/xen-unstable

view xen/include/asm-ia64/domain.h @ 5797:ca44d2dbb273

Intel's pre-bk->hg transition patches
Signed-off-by Eddie Dong <Eddie.dong@intel.com>
Signed-off-by Anthony Xu <Anthony.xu@intel.com>
Signed-off-by Kevin Tian <Kevin.tian@intel.com>
author djm@kirby.fc.hp.com
date Sat Jul 09 07:58:56 2005 -0700 (2005-07-09)
parents 51d5c1d35710
children 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 #endif //CONFIG_VTI
46 u64 xen_vastart;
47 u64 xen_vaend;
48 u64 shared_info_va;
49 #ifdef DOMU_AUTO_RESTART
50 u64 image_start;
51 u64 image_len;
52 u64 entry;
53 #endif
54 };
55 #define xen_vastart arch.xen_vastart
56 #define xen_vaend arch.xen_vaend
57 #define shared_info_va arch.shared_info_va
59 struct arch_vcpu {
60 #if 1
61 TR_ENTRY itrs[NITRS];
62 TR_ENTRY dtrs[NDTRS];
63 TR_ENTRY itlb;
64 TR_ENTRY dtlb;
65 unsigned long itlb_pte;
66 unsigned long dtlb_pte;
67 unsigned long irr[4];
68 unsigned long insvc[4];
69 unsigned long iva;
70 unsigned long dcr;
71 unsigned long itc;
72 unsigned long domain_itm;
73 unsigned long domain_itm_last;
74 unsigned long xen_itm;
75 unsigned long xen_timer_interval;
76 #endif
77 void *regs; /* temporary until find a better way to do privops */
78 int metaphysical_rr0; // from arch_domain (so is pinned)
79 int metaphysical_saved_rr0; // from arch_domain (so is pinned)
80 int breakimm; // from arch_domain (so is pinned)
81 int starting_rid; /* first RID assigned to domain */
82 int ending_rid; /* one beyond highest RID assigned to domain */
83 struct mm_struct *active_mm;
84 struct thread_struct _thread; // this must be last
85 #ifdef CONFIG_VTI
86 void (*schedule_tail) (struct vcpu *);
87 struct trap_bounce trap_bounce;
88 thash_cb_t *vtlb;
89 char irq_new_pending;
90 char irq_new_condition; // vpsr.i/vtpr change, check for pending VHPI
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 */