aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/domain.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-01-23 14:10:40 +0100
committerJan Beulich <jbeulich@suse.com>2013-01-23 14:10:40 +0100
commitb52f69ab85a35d6140ca5e8ec74240fb1e0a5e7e (patch)
tree9e73a87f33a1124851985a29c7c1bbb8f4e8264c /xen/include/asm-x86/domain.h
parent02955ee2d15a43ec18f60146064ccb8841909779 (diff)
downloadxen-b52f69ab85a35d6140ca5e8ec74240fb1e0a5e7e.tar.gz
xen-b52f69ab85a35d6140ca5e8ec74240fb1e0a5e7e.tar.bz2
xen-b52f69ab85a35d6140ca5e8ec74240fb1e0a5e7e.zip
x86: properly use map_domain_page() during domain creation/destruction
This involves no longer storing virtual addresses of the per-domain mapping L2 and L3 page tables. 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.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 0dd0884b68..94137cc74a 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -241,9 +241,9 @@ struct pv_domain
struct arch_domain
{
- struct page_info **mm_perdomain_pt_pages;
- l2_pgentry_t *mm_perdomain_l2[PERDOMAIN_SLOTS];
- l3_pgentry_t *mm_perdomain_l3;
+ void **perdomain_pts;
+ struct page_info *perdomain_l2_pg[PERDOMAIN_SLOTS];
+ struct page_info *perdomain_l3_pg;
unsigned int hv_compat_vstart;
@@ -318,13 +318,11 @@ 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_pgidx(v) \
+#define perdomain_pt_idx(v) \
((v)->vcpu_id >> (PAGETABLE_ORDER - GDT_LDT_VCPU_SHIFT))
#define perdomain_ptes(d, v) \
- ((l1_pgentry_t *)page_to_virt((d)->arch.mm_perdomain_pt_pages \
- [perdomain_pt_pgidx(v)]) + (((v)->vcpu_id << GDT_LDT_VCPU_SHIFT) & \
- (L1_PAGETABLE_ENTRIES - 1)))
-#define perdomain_pt_page(d, n) ((d)->arch.mm_perdomain_pt_pages[n])
+ ((l1_pgentry_t *)(d)->arch.perdomain_pts[perdomain_pt_idx(v)] + \
+ (((v)->vcpu_id << GDT_LDT_VCPU_SHIFT) & (L1_PAGETABLE_ENTRIES - 1)))
struct pv_vcpu
{