aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/domain.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-02-28 11:08:13 +0100
committerJan Beulich <jbeulich@suse.com>2013-02-28 11:08:13 +0100
commit703ac3abcfc5f649c038070867ee12c67f730548 (patch)
tree348bce6c9a99e9b6cf9f1c933f084345e0798d10 /xen/include/asm-x86/domain.h
parentcf0c29d1a99f17fe9e501e4e09d9d1e3eced6f98 (diff)
downloadxen-703ac3abcfc5f649c038070867ee12c67f730548.tar.gz
xen-703ac3abcfc5f649c038070867ee12c67f730548.tar.bz2
xen-703ac3abcfc5f649c038070867ee12c67f730548.zip
x86: introduce create_perdomain_mapping()
... as well as free_perdomain_mappings(), and use them to carry out the existing per-domain mapping setup/teardown. This at once makes the setup of the first sub-range PV domain specific (with idle domains also excluded), as the GDT/LDT mapping area is needed only for those. Also fix an improperly scaled BUILD_BUG_ON() expression in mapcache_domain_init(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/domain.h')
-rw-r--r--xen/include/asm-x86/domain.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 91d7d4fd00..30efe33220 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -223,6 +223,8 @@ struct time_scale {
struct pv_domain
{
+ l1_pgentry_t **gdt_ldt_l1tab;
+
/* Shared page for notifying that explicit PIRQ EOI is required. */
unsigned long *pirq_eoi_map;
unsigned long pirq_eoi_map_mfn;
@@ -241,8 +243,6 @@ struct pv_domain
struct arch_domain
{
- void **perdomain_pts;
- struct page_info *perdomain_l2_pg[PERDOMAIN_SLOTS];
struct page_info *perdomain_l3_pg;
unsigned int hv_compat_vstart;
@@ -318,10 +318,10 @@ struct arch_domain
#define has_arch_pdevs(d) (!list_empty(&(d)->arch.pdev_list))
#define has_arch_mmios(d) (!rangeset_is_empty((d)->iomem_caps))
-#define perdomain_pt_idx(v) \
+#define gdt_ldt_pt_idx(v) \
((v)->vcpu_id >> (PAGETABLE_ORDER - GDT_LDT_VCPU_SHIFT))
-#define perdomain_ptes(d, v) \
- ((l1_pgentry_t *)(d)->arch.perdomain_pts[perdomain_pt_idx(v)] + \
+#define gdt_ldt_ptes(d, v) \
+ ((d)->arch.pv_domain.gdt_ldt_l1tab[gdt_ldt_pt_idx(v)] + \
(((v)->vcpu_id << GDT_LDT_VCPU_SHIFT) & (L1_PAGETABLE_ENTRIES - 1)))
struct pv_vcpu
@@ -406,12 +406,6 @@ struct arch_vcpu
struct hvm_vcpu hvm_vcpu;
};
- /*
- * Every domain has a L1 pagetable of its own. Per-domain mappings
- * are put in this table (eg. the current GDT is mapped here).
- */
- l1_pgentry_t *perdomain_ptes;
-
pagetable_t guest_table_user; /* (MFN) x86/64 user-space pagetable */
pagetable_t guest_table; /* (MFN) guest notion of cr3 */
/* guest_table holds a ref to the page, and also a type-count unless