ia64/xen-unstable

view xen/include/asm-ia64/domain.h @ 9860:3ab5ab4d6d75

[IA64] slightly improve stability

vcpu_ptc_e: fix flush order.
vcpu_ptc_g: fix typo (only local vcpu v-tlb was flushed)
itlb_pte/dtlb_pte removed.
vcpu_itr_* and vcpu_itc_no_srlz call vcpu_set_tr_entry coherently.
in_tpa parameter of vcpu_translate removed.
handle_lazy_cover is now static and unused 'isr' removed.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Mon May 08 12:47:54 2006 -0600 (2006-05-08)
parents ced37bea0647
children 9de9ad0685bf
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 /* Cleanly crash the current domain with a message. */
22 extern void panic_domain(struct pt_regs *, const char *, ...)
23 __attribute__ ((noreturn, format (printf, 2, 3)));
25 struct arch_domain {
26 struct mm_struct *mm;
27 unsigned long metaphysical_rr0;
28 unsigned long metaphysical_rr4;
30 /* There are two ranges of RID for a domain:
31 one big range, used to virtualize domain RID,
32 one small range for internal Xen use (metaphysical). */
33 /* Big range. */
34 int starting_rid; /* first RID assigned to domain */
35 int ending_rid; /* one beyond highest RID assigned to domain */
36 int rid_bits; /* number of virtual rid bits (default: 18) */
37 /* Metaphysical range. */
38 int starting_mp_rid;
39 int ending_mp_rid;
41 int breakimm; /* The imm value for hypercalls. */
43 int physmap_built; /* Whether is physmap built or not */
44 int imp_va_msb;
45 /* System pages out of guest memory, like for xenstore/console */
46 unsigned long sys_pgnr;
47 unsigned long max_pfn; /* Max pfn including I/O holes */
48 struct virtual_platform_def vmx_platform;
49 #define hvm_domain vmx_platform /* platform defs are not vmx specific */
51 u64 xen_vastart;
52 u64 xen_vaend;
53 u64 shared_info_va;
54 unsigned long initrd_start;
55 unsigned long initrd_len;
56 char *cmdline;
57 };
58 #define xen_vastart arch.xen_vastart
59 #define xen_vaend arch.xen_vaend
60 #define shared_info_va arch.shared_info_va
61 #define INT_ENABLE_OFFSET(v) \
62 (sizeof(vcpu_info_t) * (v)->vcpu_id + \
63 offsetof(vcpu_info_t, evtchn_upcall_mask))
65 struct arch_vcpu {
66 TR_ENTRY itrs[NITRS];
67 TR_ENTRY dtrs[NDTRS];
68 TR_ENTRY itlb;
69 TR_ENTRY dtlb;
70 unsigned int itr_regions;
71 unsigned int dtr_regions;
72 unsigned long irr[4];
73 unsigned long insvc[4];
74 unsigned long tc_regions;
75 unsigned long iva;
76 unsigned long dcr;
77 unsigned long itc;
78 unsigned long domain_itm;
79 unsigned long domain_itm_last;
80 unsigned long xen_itm;
82 mapped_regs_t *privregs; /* save the state of vcpu */
84 /* These fields are copied from arch_domain to make access easier/faster
85 in assembly code. */
86 unsigned long metaphysical_rr0; // from arch_domain (so is pinned)
87 unsigned long metaphysical_rr4; // from arch_domain (so is pinned)
88 unsigned long metaphysical_saved_rr0; // from arch_domain (so is pinned)
89 unsigned long metaphysical_saved_rr4; // from arch_domain (so is pinned)
90 int breakimm; // from arch_domain (so is pinned)
91 int starting_rid; /* first RID assigned to domain */
92 int ending_rid; /* one beyond highest RID assigned to domain */
94 struct thread_struct _thread; // this must be last
96 thash_cb_t vtlb;
97 thash_cb_t vhpt;
98 char irq_new_pending;
99 char irq_new_condition; // vpsr.i/vtpr change, check for pending VHPI
100 char hypercall_continuation;
101 //for phycial emulation
102 unsigned long old_rsc;
103 int mode_flags;
104 struct arch_vmx_struct arch_vmx; /* Virtual Machine Extensions */
105 };
107 //#define thread arch._thread
109 // FOLLOWING FROM linux-2.6.7/include/sched.h
111 struct mm_struct {
112 pgd_t * pgd;
113 // atomic_t mm_users; /* How many users with user space? */
114 struct list_head pt_list; /* List of pagetable */
115 };
117 extern struct mm_struct init_mm;
119 struct page_info * assign_new_domain_page(struct domain *d, unsigned long mpaddr);
120 void assign_new_domain0_page(struct domain *d, unsigned long mpaddr);
121 void assign_domain_page(struct domain *d, unsigned long mpaddr, unsigned long physaddr);
122 void assign_domain_io_page(struct domain *d, unsigned long mpaddr, unsigned long flags);
123 #ifdef CONFIG_XEN_IA64_DOM0_VP
124 unsigned long assign_domain_mmio_page(struct domain *d, unsigned long mpaddr, unsigned long size);
125 unsigned long assign_domain_mach_page(struct domain *d, unsigned long mpaddr, unsigned long size);
126 unsigned long do_dom0vp_op(unsigned long cmd, unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long arg3);
127 unsigned long dom0vp_populate_physmap(struct domain *d, unsigned long gpfn, unsigned int extent_order, unsigned int address_bits);
128 unsigned long dom0vp_zap_physmap(struct domain *d, unsigned long gpfn, unsigned int extent_order);
129 unsigned long dom0vp_add_physmap(struct domain* d, unsigned long gpfn, unsigned long mfn, unsigned int flags, domid_t domid);
130 #endif
132 #include <asm/uaccess.h> /* for KERNEL_DS */
133 #include <asm/pgtable.h>
135 #endif /* __ASM_DOMAIN_H__ */
137 /*
138 * Local variables:
139 * mode: C
140 * c-set-style: "BSD"
141 * c-basic-offset: 4
142 * tab-width: 4
143 * indent-tabs-mode: nil
144 * End:
145 */