ia64/xen-unstable

view xen/include/asm-ia64/domain.h @ 9685:4e8a64d8bd0e

[IA64] regionreg.c: deallocate metaphysical rids

allocate_rid_range also allocates metaphysical rids.
deallocate_rid_range also deallocates mp rids.
init_rid_allocator() added.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Fri Apr 14 14:13:13 2006 -0600 (2006-04-14)
parents 827c65c06a66
children 2de95fd92e74
line source
1 #ifndef __ASM_DOMAIN_H__
2 #define __ASM_DOMAIN_H__
4 #include <linux/thread_info.h>
5 #include <asm/tlb.h>
6 #include <asm/vmx_vpd.h>
7 #include <asm/vmmu.h>
8 #include <asm/regionreg.h>
9 #include <public/arch-ia64.h>
10 #include <asm/vmx_platform.h>
11 #include <xen/list.h>
12 #include <xen/cpumask.h>
14 extern void domain_relinquish_resources(struct domain *);
16 /* Flush cache of domain d.
17 If sync_only is true, only synchronize I&D caches,
18 if false, flush and invalidate caches. */
19 extern void domain_cache_flush (struct domain *d, int sync_only);
21 struct arch_domain {
22 struct mm_struct *mm;
23 unsigned long metaphysical_rr0;
24 unsigned long metaphysical_rr4;
26 /* There are two ranges of RID for a domain:
27 one big range, used to virtualize domain RID,
28 one small range for internal Xen use (metaphysical). */
29 /* Big range. */
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 /* Metaphysical range. */
34 int starting_mp_rid;
35 int ending_mp_rid;
37 int breakimm; /* The imm value for hypercalls. */
39 int physmap_built; /* Whether is physmap built or not */
40 int imp_va_msb;
41 /* System pages out of guest memory, like for xenstore/console */
42 unsigned long sys_pgnr;
43 unsigned long max_pfn; /* Max pfn including I/O holes */
44 struct virtual_platform_def vmx_platform;
45 #define hvm_domain vmx_platform /* platform defs are not vmx specific */
47 u64 xen_vastart;
48 u64 xen_vaend;
49 u64 shared_info_va;
50 unsigned long initrd_start;
51 unsigned long initrd_len;
52 char *cmdline;
53 };
54 #define xen_vastart arch.xen_vastart
55 #define xen_vaend arch.xen_vaend
56 #define shared_info_va arch.shared_info_va
57 #define INT_ENABLE_OFFSET(v) \
58 (sizeof(vcpu_info_t) * (v)->vcpu_id + \
59 offsetof(vcpu_info_t, evtchn_upcall_mask))
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 int itr_regions;
68 unsigned int dtr_regions;
69 unsigned long itlb_pte;
70 unsigned long dtlb_pte;
71 unsigned long irr[4];
72 unsigned long insvc[4];
73 unsigned long iva;
74 unsigned long dcr;
75 unsigned long itc;
76 unsigned long domain_itm;
77 unsigned long domain_itm_last;
78 unsigned long xen_itm;
79 #endif
80 mapped_regs_t *privregs; /* save the state of vcpu */
81 unsigned long metaphysical_rr0; // from arch_domain (so is pinned)
82 unsigned long metaphysical_rr4; // from arch_domain (so is pinned)
83 unsigned long metaphysical_saved_rr0; // from arch_domain (so is pinned)
84 unsigned long metaphysical_saved_rr4; // from arch_domain (so is pinned)
85 int breakimm; // from arch_domain (so is pinned)
86 int starting_rid; /* first RID assigned to domain */
87 int ending_rid; /* one beyond highest RID assigned to domain */
88 struct thread_struct _thread; // this must be last
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;
97 struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */
98 };
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 pt_list; /* List of pagetable */
122 struct list_head mmlist; /* List of all active mm's. These are globally strung
123 * together off init_mm.mmlist, and are protected
124 * by mmlist_lock
125 */
127 #ifndef XEN
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 #endif
138 #ifdef CONFIG_HUGETLB_PAGE
139 int used_hugetlb;
140 #endif
141 #ifndef XEN
142 cpumask_t cpu_vm_mask;
144 /* Architecture-specific MM context */
145 mm_context_t context;
147 /* coredumping support */
148 int core_waiters;
149 struct completion *core_startup_done, core_done;
151 /* aio bits */
152 rwlock_t ioctx_list_lock;
153 struct kioctx *ioctx_list;
155 struct kioctx default_kioctx;
156 #endif
157 };
159 extern struct mm_struct init_mm;
161 #include <asm/uaccess.h> /* for KERNEL_DS */
162 #include <asm/pgtable.h>
164 #endif /* __ASM_DOMAIN_H__ */
166 /*
167 * Local variables:
168 * mode: C
169 * c-set-style: "BSD"
170 * c-basic-offset: 4
171 * tab-width: 4
172 * indent-tabs-mode: nil
173 * End:
174 */